31 #define JSONPATH_VERSION (0x01)
32 #define JSONPATH_LAX (0x80000000)
33 #define JSONPATH_HDRSZ (offsetof(JsonPath, data))
35 #define DatumGetJsonPathP(d) ((JsonPath *) DatumGetPointer(PG_DETOAST_DATUM(d)))
36 #define DatumGetJsonPathPCopy(d) ((JsonPath *) DatumGetPointer(PG_DETOAST_DATUM_COPY(d)))
37 #define PG_GETARG_JSONPATH_P(x) DatumGetJsonPathP(PG_GETARG_DATUM(x))
38 #define PG_GETARG_JSONPATH_P_COPY(x) DatumGetJsonPathPCopy(PG_GETARG_DATUM(x))
39 #define PG_RETURN_JSONPATH_P(p) PG_RETURN_POINTER(p)
41 #define jspIsScalar(type) ((type) >= jpiNull && (type) <= jpiBool)
94 #define JSP_REGEX_ICASE 0x01
95 #define JSP_REGEX_DOTALL 0x02
96 #define JSP_REGEX_MLINE 0x04
97 #define JSP_REGEX_WSPACE 0x08
98 #define JSP_REGEX_QUOTE 0x10
167 #define jspHasNext(jsp) ((jsp)->nextPos > 0)
#define FLEXIBLE_ARRAY_MEMBER
static void PGresult * res
PGDLLIMPORT const TableFuncRoutine JsonbTableRoutine
bool jspIsMutable(JsonPath *path, List *varnames, List *varexprs)
void jspGetLeftArg(JsonPathItem *v, JsonPathItem *a)
int jspConvertRegexFlags(uint32 xflags)
void jspGetArg(JsonPathItem *v, JsonPathItem *a)
void JsonItemFromDatum(Datum val, Oid typid, int32 typmod, JsonbValue *res)
Datum JsonPathQuery(Datum jb, JsonPath *jp, JsonWrapper wrapper, bool *empty, bool *error, List *vars)
void jspInitByBuffer(JsonPathItem *v, char *base, int32 pos)
bool jspGetBool(JsonPathItem *v)
void jspInit(JsonPathItem *v, JsonPath *js)
int EvalJsonPathVar(void *vars, char *varName, int varNameLen, JsonbValue *val, JsonbValue *baseObject)
struct JsonPathVariableEvalContext JsonPathVariableEvalContext
const char * jspOperationName(JsonPathItemType type)
Numeric jspGetNumeric(JsonPathItem *v)
bool jspGetArraySubscript(JsonPathItem *v, JsonPathItem *from, JsonPathItem *to, int i)
bool jspGetNext(JsonPathItem *v, JsonPathItem *a)
JsonPathParseResult * parsejsonpath(const char *str, int len)
struct JsonPathParseResult JsonPathParseResult
bool JsonPathExists(Datum jb, JsonPath *path, List *vars, bool *error)
void jspGetRightArg(JsonPathItem *v, JsonPathItem *a)
char * jspGetString(JsonPathItem *v, int32 *len)
struct JsonPathItem JsonPathItem
JsonbValue * JsonPathValue(Datum jb, JsonPath *jp, bool *empty, bool *error, List *vars)
struct JsonPathItem::@136::@140 value
struct JsonPathItem::@136::@138::@142 * elems
struct JsonPathItem::@136::@141 like_regex
struct JsonPathItem::@136::@137 args
struct JsonPathItem::@136::@139 anybounds
struct JsonPathItem::@136::@138 array
union JsonPathItem::@136 content
struct JsonPathParseItem::@143::@144 args
struct JsonPathParseItem::@143::@145::@149 * elems
struct JsonPathParseItem::@143::@146 anybounds
JsonPathParseItem * right
struct JsonPathParseItem::@143::@148 string
struct JsonPathParseItem::@143::@145 array
struct JsonPathParseItem::@143::@147 like_regex
union JsonPathParseItem::@143 value
struct ExprState * estate
struct ExprContext * econtext