Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit856dc9a

Browse files
author
Nikita Glukhov
committed
Hide JsonbIterator struct definition
1 parent080b741 commit856dc9a

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

‎src/backend/utils/adt/jsonb_util.c‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,36 @@ struct JsonbParseState
4848
boolskip_nulls;/* Skip null object fields */
4949
};
5050

51+
structJsonbIterator
52+
{
53+
/* Container being iterated */
54+
JsonbContainer*container;
55+
uint32nElems;/* Number of elements in children array (will
56+
* be nPairs for objects) */
57+
boolisScalar;/* Pseudo-array scalar value? */
58+
JEntry*children;/* JEntrys for child nodes */
59+
/* Data proper. This points to the beginning of the variable-length data */
60+
char*dataProper;
61+
62+
/* Current item in buffer (up to nElems) */
63+
intcurIndex;
64+
65+
/* Data offset corresponding to current item */
66+
uint32curDataOffset;
67+
68+
/*
69+
* If the container is an object, we want to return keys and values
70+
* alternately; so curDataOffset points to the current key, and
71+
* curValueOffset points to the current value.
72+
*/
73+
uint32curValueOffset;
74+
75+
/* Private state */
76+
JsonbIterStatestate;
77+
78+
structJsonbIterator*parent;
79+
};
80+
5181
staticvoidfillJsonbValue(JsonbContainer*container,intindex,
5282
char*base_addr,uint32offset,
5383
JsonbValue*result);

‎src/include/utils/jsonb.h‎

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -339,35 +339,7 @@ typedef enum
339339
JBI_OBJECT_VALUE
340340
}JsonbIterState;
341341

342-
typedefstructJsonbIterator
343-
{
344-
/* Container being iterated */
345-
JsonbContainer*container;
346-
uint32nElems;/* Number of elements in children array (will
347-
* be nPairs for objects) */
348-
boolisScalar;/* Pseudo-array scalar value? */
349-
JEntry*children;/* JEntrys for child nodes */
350-
/* Data proper. This points to the beginning of the variable-length data */
351-
char*dataProper;
352-
353-
/* Current item in buffer (up to nElems) */
354-
intcurIndex;
355-
356-
/* Data offset corresponding to current item */
357-
uint32curDataOffset;
358-
359-
/*
360-
* If the container is an object, we want to return keys and values
361-
* alternately; so curDataOffset points to the current key, and
362-
* curValueOffset points to the current value.
363-
*/
364-
uint32curValueOffset;
365-
366-
/* Private state */
367-
JsonbIterStatestate;
368-
369-
structJsonbIterator*parent;
370-
}JsonbIterator;
342+
typedefstructJsonbIteratorJsonbIterator;
371343

372344
/* unlike with json categories, we need to treat json and jsonb differently */
373345
typedefenum/* type categories for datum_to_jsonb */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp