25 #if defined(LWS_WITH_STRUCT_SQLITE3)
85 #define LSM_SIGNED(type, name, qname) \
90 offsetof(type, name), \
91 sizeof ((type *)0)->name, \
97 #define LSM_UNSIGNED(type, name, qname) \
102 offsetof(type, name), \
103 sizeof ((type *)0)->name, \
109 #define LSM_BOOLEAN(type, name, qname) \
114 offsetof(type, name), \
115 sizeof ((type *)0)->name, \
121 #define LSM_CARRAY(type, name, qname) \
126 offsetof(type, name), \
127 sizeof (((type *)0)->name), \
130 LSMT_STRING_CHAR_ARRAY \
133 #define LSM_STRING_PTR(type, name, qname) \
138 offsetof(type, name), \
139 sizeof (((type *)0)->name), \
145 #define LSM_LIST(ptype, pname, ctype, cname, lejp_cb, cmap, qname) \
150 offsetof(ptype, pname), \
152 offsetof(ctype, cname), \
153 LWS_ARRAY_SIZE(cmap), \
157 #define LSM_CHILD_PTR(ptype, pname, ctype, lejp_cb, cmap, qname) \
162 offsetof(ptype, pname), \
165 LWS_ARRAY_SIZE(cmap), \
169 #define LSM_SCHEMA(ctype, lejp_cb, map, schema_name) \
177 LWS_ARRAY_SIZE(map), \
181 #define LSM_SCHEMA_DLL2(ctype, cdll2mem, lejp_cb, map, schema_name) \
186 offsetof(ctype, cdll2mem), \
189 LWS_ARRAY_SIZE(map), \
198 #define LSM_BLOB_PTR(type, blobptr_name, qname) \
203 offsetof(type, blobptr_name), \
204 sizeof (((type *)0)->blobptr_name), \
254 size_t map_entries,
int flags,
255 const void *ptoplevel);
262 size_t len,
size_t *written);
273 struct lwsac **ac,
int start,
int limit);
280 char create_if_missing,
sqlite3 **pdb);
#define LEJP_MAX_PARSING_STACK_DEPTH
#define LEJP_STRING_CHUNK
signed char(* lejp_callback)(struct lejp_ctx *ctx, char reason)
LWS_VISIBLE LWS_EXTERN int lws_struct_json_init_parse(struct lejp_ctx *ctx, lejp_callback cb, void *user)
lws_struct_serialize_st_t st[LEJP_MAX_PARSING_STACK_DEPTH]
char buf[LEJP_STRING_CHUNK+1]
const struct lws_struct_map * child_map
LWS_VISIBLE LWS_EXTERN int lws_struct_sq3_serialize(sqlite3 *pdb, const lws_struct_map_t *schema, lws_dll2_owner_t *owner, uint32_t manual_idx)
LWS_VISIBLE LWS_EXTERN int lws_struct_sq3_close(sqlite3 **pdb)
const lws_struct_map_t * map
int(* lws_struct_args_cb)(void *obj, void *cb_arg)
LWS_VISIBLE LWS_EXTERN lws_struct_json_serialize_result_t lws_struct_json_serialize(lws_struct_serialize_t *js, uint8_t *buf, size_t len, size_t *written)
LWS_VISIBLE LWS_EXTERN void lws_struct_json_serialize_destroy(lws_struct_serialize_t **pjs)
LWS_VISIBLE LWS_EXTERN signed char lws_struct_default_lejp_cb(struct lejp_ctx *ctx, char reason)
struct lws_struct_args lws_struct_args_t
struct lws_struct_serialize lws_struct_serialize_t
const struct lws_dll2 * dllpos
struct lejp_collation lejp_collation_t
struct lws_dll2_owner chunks_owner
LWS_VISIBLE LWS_EXTERN int lws_struct_sq3_create_table(sqlite3 *pdb, const lws_struct_map_t *schema)
struct lws_struct_map lws_struct_map_t
lws_struct_map_type_eum type
LWS_VISIBLE LWS_EXTERN int lws_struct_sq3_open(struct lws_context *context, const char *sqlite3_path, char create_if_missing, sqlite3 **pdb)
LWS_VISIBLE LWS_EXTERN signed char lws_struct_schema_only_lejp_cb(struct lejp_ctx *ctx, char reason)
LWS_VISIBLE LWS_EXTERN int lws_struct_sq3_deserialize(sqlite3 *pdb, const char *filter, const char *order, const lws_struct_map_t *schema, lws_dll2_owner_t *o, struct lwsac **ac, int start, int limit)
LWS_VISIBLE LWS_EXTERN lws_struct_serialize_t * lws_struct_json_serialize_create(const lws_struct_map_t *map, size_t map_entries, int flags, const void *ptoplevel)
lws_struct_json_serialize_result_t
size_t map_entries_st[LEJP_MAX_PARSING_STACK_DEPTH]
const lws_struct_map_t * map_st[LEJP_MAX_PARSING_STACK_DEPTH]
@ LSSERJ_FLAG_OMIT_SCHEMA
struct lws_struct_serialize_st lws_struct_serialize_st_t