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

Commit846a38a

Browse files
author
Nikita Glukhov
committed
Hide JsonbIterator struct definition
1 parent779bb19 commit846a38a

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
@@ -41,6 +41,36 @@ struct JsonbParseState
4141
structJsonbParseState*next;
4242
};
4343

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

‎src/include/utils/jsonb.h

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -316,35 +316,7 @@ typedef enum
316316
JBI_OBJECT_VALUE
317317
}JsonbIterState;
318318

319-
typedefstructJsonbIterator
320-
{
321-
/* Container being iterated */
322-
JsonbContainer*container;
323-
uint32nElems;/* Number of elements in children array (will
324-
* be nPairs for objects) */
325-
boolisScalar;/* Pseudo-array scalar value? */
326-
JEntry*children;/* JEntrys for child nodes */
327-
/* Data proper. This points to the beginning of the variable-length data */
328-
char*dataProper;
329-
330-
/* Current item in buffer (up to nElems) */
331-
intcurIndex;
332-
333-
/* Data offset corresponding to current item */
334-
uint32curDataOffset;
335-
336-
/*
337-
* If the container is an object, we want to return keys and values
338-
* alternately; so curDataOffset points to the current key, and
339-
* curValueOffset points to the current value.
340-
*/
341-
uint32curValueOffset;
342-
343-
/* Private state */
344-
JsonbIterStatestate;
345-
346-
structJsonbIterator*parent;
347-
}JsonbIterator;
319+
typedefstructJsonbIteratorJsonbIterator;
348320

349321

350322
/* Support functions */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp