PostgreSQL Source Code: src/include/utils/jsonfuncs.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef JSONFUNCS_H
15#define JSONFUNCS_H
16
20
21
22
23
24
26{
33
34
36
37
38typedef text *(*JsonTransformStringValuesAction) (void *state, char *elem_value, int elem_len);
39
40
42
43
45 struct Node *escontext);
46
47#define pg_parse_json_or_ereport(lex, sem) \
48 (void) pg_parse_json_or_errsave(lex, sem, NULL)
49
50
52 struct Node *escontext);
53
54
56
66
67
68typedef enum
69{
83
87 Oid outfuncoid);
89 Oid outfuncoid);
91
95 bool *isnull,
96 bool omit_quotes,
97 Node *escontext);
98
99#endif
JsonLexContext * makeJsonLexContext(JsonLexContext *lex, text *json, bool need_escapes)
Datum jsonb_from_text(text *js, bool unique_keys)
text * transform_json_string_values(text *json, void *action_state, JsonTransformStringValuesAction transform_action)
Datum json_populate_type(Datum json_val, Oid json_type, Oid typid, int32 typmod, void **cache, MemoryContext mcxt, bool *isnull, bool omit_quotes, Node *escontext)
uint32 parse_jsonb_index_flags(Jsonb *jb)
text *(* JsonTransformStringValuesAction)(void *state, char *elem_value, int elem_len)
void(* JsonIterateStringValuesAction)(void *state, char *elem_value, int elem_len)
JsonTokenType json_get_first_token(text *json, bool throw_error)
void iterate_jsonb_values(Jsonb *jb, uint32 flags, void *state, JsonIterateStringValuesAction action)
void json_categorize_type(Oid typoid, bool is_jsonb, JsonTypeCategory *tcategory, Oid *outfuncoid)
void iterate_json_values(text *json, uint32 flags, void *action_state, JsonIterateStringValuesAction action)
void json_errsave_error(JsonParseErrorType error, JsonLexContext *lex, struct Node *escontext)
Jsonb * transform_jsonb_string_values(Jsonb *jsonb, void *action_state, JsonTransformStringValuesAction transform_action)
bool pg_parse_json_or_errsave(JsonLexContext *lex, const JsonSemAction *sem, struct Node *escontext)
Datum datum_to_json(Datum val, JsonTypeCategory tcategory, Oid outfuncoid)
Datum datum_to_jsonb(Datum val, JsonTypeCategory tcategory, Oid outfuncoid)