[CP] sync bugfix.fix sanity json pl type coredump, fix treat expr in pl coredump
This commit is contained in:
5
deps/oblib/src/lib/json_type/ob_json_base.h
vendored
5
deps/oblib/src/lib/json_type/ob_json_base.h
vendored
@ -301,6 +301,11 @@ public:
|
||||
// @return Returns object_iterator
|
||||
virtual JsonObjectIterator object_iterator() const;
|
||||
|
||||
// Get member count of json.
|
||||
// scalar 1, array, object as child number
|
||||
// @return json containner returns the capacity, json scalar return 1.
|
||||
virtual uint64_t member_count() const = 0;
|
||||
|
||||
// getter
|
||||
virtual bool get_boolean() const = 0;
|
||||
virtual double get_double() const = 0;
|
||||
|
||||
7
deps/oblib/src/lib/json_type/ob_json_bin.h
vendored
7
deps/oblib/src/lib/json_type/ob_json_bin.h
vendored
@ -194,6 +194,7 @@ public:
|
||||
{
|
||||
return field_type_;
|
||||
}
|
||||
|
||||
int get_array_element(uint64_t index, ObIJsonBase *&value) const override;
|
||||
int get_object_value(uint64_t index, ObIJsonBase *&value) const override;
|
||||
int get_object_value(const ObString &key, ObIJsonBase *&value) const override;
|
||||
@ -398,6 +399,12 @@ public:
|
||||
// release resource
|
||||
void destroy();
|
||||
|
||||
virtual uint64_t member_count() const override
|
||||
{
|
||||
return (json_type() == ObJsonNodeType::J_ARRAY || json_type() == ObJsonNodeType::J_OBJECT) ?
|
||||
element_count() : 1;
|
||||
}
|
||||
|
||||
private:
|
||||
// used as stack
|
||||
struct ObJBNodeMeta {
|
||||
|
||||
1
deps/oblib/src/lib/json_type/ob_json_tree.h
vendored
1
deps/oblib/src/lib/json_type/ob_json_tree.h
vendored
@ -70,6 +70,7 @@ public:
|
||||
int get_obtime(ObTime &t) const override;
|
||||
OB_INLINE ObJsonInType get_internal_type() const override { return ObJsonInType::JSON_TREE; }
|
||||
OB_INLINE uint64_t element_count() const override { return 1; }
|
||||
virtual uint64_t member_count() const override { return element_count(); }
|
||||
OB_INLINE ObObjType field_type() const override
|
||||
{
|
||||
return ObMaxType; // ObJsonOpaque override
|
||||
|
||||
Reference in New Issue
Block a user