PostgreSQL Source Code: src/include/utils/jsonpath.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef JSONPATH_H

15#define JSONPATH_H

16

22

23typedef struct

24{

25 int32 vl_len_;

29

30#define JSONPATH_VERSION (0x01)

31#define JSONPATH_LAX (0x80000000)

32#define JSONPATH_HDRSZ (offsetof(JsonPath, data))

33

36{

38}

39

42{

44}

45

46#define PG_GETARG_JSONPATH_P(x) DatumGetJsonPathP(PG_GETARG_DATUM(x))

47#define PG_GETARG_JSONPATH_P_COPY(x) DatumGetJsonPathPCopy(PG_GETARG_DATUM(x))

48#define PG_RETURN_JSONPATH_P(p) PG_RETURN_POINTER(p)

49

50#define jspIsScalar(type) ((type) >= jpiNull && (type) <= jpiBool)

51

52

53

54

55

56

57

58

59

60

61

63{

68 jpiAnd,

69 jpiOr,

95 jpiType,

96 jpiSize,

97 jpiAbs,

103 jpiSubscript,

119

120

121#define JSP_REGEX_ICASE 0x01

122#define JSP_REGEX_DOTALL 0x02

123#define JSP_REGEX_MLINE 0x04

124#define JSP_REGEX_WSPACE 0x08

125#define JSP_REGEX_QUOTE 0x10

126

127

128

129

130

131

132

133

134

136{

138

139

141

142

143

144

145

147

148 union

149 {

150

151 struct

152 {

156

157

159

160

161 struct

162 {

164 struct

165 {

170

171

172 struct

173 {

177

178 struct

179 {

180 char *data;

183

184 struct

185 {

193

194#define jspHasNext(jsp) ((jsp)->nextPos > 0)

195

208

210

211

212

213

214

216

218{

221

222 union

223 {

224

225

226 struct

227 {

231

232

234

235

236 struct

237 {

239 struct

240 {

245

246

247 struct

248 {

252

253 struct

254 {

256 char *pattern;

260

261

264 struct

265 {

267 char *val;

270};

271

273{

277

279 struct Node *escontext);

280

282 struct Node *escontext);

283

284

285

286

288{

290 int namelen;

296

297

298

302 const char *column_name);

305 const char *column_name);

306

307

309

310#endif

#define FLEXIBLE_ARRAY_MEMBER

#define PG_DETOAST_DATUM_COPY(datum)

#define PG_DETOAST_DATUM(datum)

PGDLLIMPORT const TableFuncRoutine JsonbTableRoutine

bool JsonPathExists(Datum jb, JsonPath *jp, bool *error, List *vars)

bool jspIsMutable(JsonPath *path, List *varnames, List *varexprs)

void jspGetLeftArg(JsonPathItem *v, JsonPathItem *a)

void jspGetArg(JsonPathItem *v, JsonPathItem *a)

void jspInitByBuffer(JsonPathItem *v, char *base, int32 pos)

bool jspGetBool(JsonPathItem *v)

void jspInit(JsonPathItem *v, JsonPath *js)

Datum JsonPathQuery(Datum jb, JsonPath *jp, JsonWrapper wrapper, bool *empty, bool *error, List *vars, const char *column_name)

char * jspGetString(JsonPathItem *v, int32 *len)

bool jspConvertRegexFlags(uint32 xflags, int *result, struct Node *escontext)

Numeric jspGetNumeric(JsonPathItem *v)

bool jspGetArraySubscript(JsonPathItem *v, JsonPathItem *from, JsonPathItem *to, int i)

struct JsonPathVariable JsonPathVariable

static JsonPath * DatumGetJsonPathPCopy(Datum d)

const char * jspOperationName(JsonPathItemType type)

bool jspGetNext(JsonPathItem *v, JsonPathItem *a)

JsonbValue * JsonPathValue(Datum jb, JsonPath *jp, bool *empty, bool *error, List *vars, const char *column_name)

JsonPathParseResult * parsejsonpath(const char *str, int len, struct Node *escontext)

struct JsonPathParseResult JsonPathParseResult

static JsonPath * DatumGetJsonPathP(Datum d)

void jspGetRightArg(JsonPathItem *v, JsonPathItem *a)

struct JsonPathItem JsonPathItem

struct JsonPathItem::@147::@149::@153 * elems

struct JsonPathItem::@147::@151 value

struct JsonPathItem::@147::@148 args

union JsonPathItem::@147 content

struct JsonPathItem::@147::@149 array

struct JsonPathItem::@147::@150 anybounds

struct JsonPathItem::@147::@152 like_regex

struct JsonPathParseItem::@154::@157 anybounds

JsonPathParseItem * right

struct JsonPathParseItem::@154::@156 array

struct JsonPathParseItem::@154::@158 like_regex

struct JsonPathParseItem::@154::@156::@160 * elems

struct JsonPathParseItem::@154::@155 args

struct JsonPathParseItem::@154::@159 string

union JsonPathParseItem::@154 value