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

Commit8d99ad5

Browse files
author
Nikita Glukhov
committed
Hide JsonbIterator struct definition
1 parent4588cac commit8d99ad5

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
@@ -45,6 +45,36 @@ struct JsonbParseState
4545
structJsonbParseState*next;
4646
};
4747

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

373345
/* Support functions */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp