25 #if defined(LWS_WITH_STRUCT_SQLITE3)
33 LSMT_STRING_CHAR_ARRAY,
40 } lws_struct_map_type_eum;
45 char buf[LEJP_STRING_CHUNK + 1];
51 lejp_callback lejp_cb;
55 size_t child_map_size;
56 lws_struct_map_type_eum type;
59 typedef int (*lws_struct_args_cb)(
void *obj,
void *cb_arg);
63 lws_struct_args_cb cb;
69 size_t toplevel_dll2_ofs;
70 size_t map_entries_st[LEJP_MAX_PARSING_STACK_DEPTH];
80 struct lwsac *ac_chunks;
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), \
222 LSSERJ_FLAG_PRETTY = (1 << 0),
223 LSSERJ_FLAG_OMIT_SCHEMA = (1 << 1)
237 LSJS_RESULT_CONTINUE,
240 } lws_struct_json_serialize_result_t;
242 LWS_VISIBLE LWS_EXTERN
int
243 lws_struct_json_init_parse(
struct lejp_ctx *ctx, lejp_callback cb,
246 LWS_VISIBLE LWS_EXTERN
signed char
247 lws_struct_schema_only_lejp_cb(
struct lejp_ctx *ctx,
char reason);
249 LWS_VISIBLE LWS_EXTERN
signed char
250 lws_struct_default_lejp_cb(
struct lejp_ctx *ctx,
char reason);
254 size_t map_entries,
int flags,
255 const void *ptoplevel);
257 LWS_VISIBLE LWS_EXTERN
void
260 LWS_VISIBLE LWS_EXTERN lws_struct_json_serialize_result_t
262 size_t len,
size_t *written);
264 typedef struct sqlite3 sqlite3;
266 LWS_VISIBLE LWS_EXTERN
int
270 LWS_VISIBLE LWS_EXTERN
int
271 lws_struct_sq3_deserialize(sqlite3 *pdb,
const char *filter,
const char *order,
273 struct lwsac **ac,
int start,
int limit);
275 LWS_VISIBLE LWS_EXTERN
int
278 LWS_VISIBLE LWS_EXTERN
int
279 lws_struct_sq3_open(
struct lws_context *context,
const char *sqlite3_path,
280 char create_if_missing, sqlite3 **pdb);
282 LWS_VISIBLE LWS_EXTERN
int
283 lws_struct_sq3_close(sqlite3 **pdb);
Definition: lws-struct.h:42
Definition: lws-lejp.h:218
Definition: lws-dll2.h:203
Definition: lws-dll2.h:197
Definition: lws-struct.h:61
Definition: lws-struct.h:48
Definition: lws-struct.h:210
Definition: lws-struct.h:226