Lines Matching refs:jbl
4 static iwrc _jb_put_new_lw(JBCOLL jbc, JBL jbl, int64_t *id);
452 static iwrc _jb_idx_record_add(JBIDX idx, int64_t id, JBL jbl, JBL jblprev) { in _jb_idx_record_add() argument
468 jbv_found = jbl ? _jbl_at(jbl, idx->ptr, &jbv) : false; in _jb_idx_record_add()
606 IW_INLINE iwrc _jb_idx_record_remove(JBIDX idx, int64_t id, JBL jbl) { in _jb_idx_record_remove() argument
607 return _jb_idx_record_add(idx, id, 0, jbl); in _jb_idx_record_remove()
615 JBL jbl = &jbs; in _jb_idx_fill() local
631 rc = _jb_idx_record_add(idx, llv, jbl, 0); in _jb_idx_fill()
659 rc = _jb_idx_record_add(idx, ctx->id, ctx->jbl, prev); in _jb_put_handler_after()
678 IWRC(_jb_idx_record_remove(idx, ctx->id, ctx->jbl), rc); in _jb_put_handler_after()
742 IW_INLINE iwrc _jb_put_impl(JBCOLL jbc, JBL jbl, int64_t id) { in _jb_put_impl() argument
750 .jbl = jbl in _jb_put_impl()
752 iwrc rc = jbl_as_buf(jbl, &val.data, &val.size); in _jb_put_impl()
757 iwrc jb_put(JBCOLL jbc, JBL jbl, int64_t id) { in jb_put() argument
758 return _jb_put_impl(jbc, jbl, id); in jb_put()
761 iwrc jb_cursor_set(JBCOLL jbc, IWKV_cursor cur, int64_t id, JBL jbl) { in jb_cursor_set() argument
766 .jbl = jbl in jb_cursor_set()
768 iwrc rc = jbl_as_buf(jbl, &val.data, &val.size); in jb_cursor_set()
777 JBL jbl = 0; in _jb_exec_upsert_lw() local
794 RCC(rc, finish, jbl_from_node(&jbl, n)); in _jb_exec_upsert_lw()
795 RCC(rc, finish, _jb_put_new_lw(ctx->jbc, jbl, &id)); in _jb_exec_upsert_lw()
800 .raw = jbl, in _jb_exec_upsert_lw()
811 jbl_destroy(&jbl); in _jb_exec_upsert_lw()
1334 iwrc ejdb_put(EJDB db, const char *coll, JBL jbl, int64_t id) { in ejdb_put() argument
1335 if (!jbl) { in ejdb_put()
1342 rc = _jb_put_impl(jbc, jbl, id); in ejdb_put()
1351 JBL jbl = 0; in ejdb_put_jbn() local
1352 iwrc rc = jbl_from_node(&jbl, jbn); in ejdb_put_jbn()
1354 rc = ejdb_put(db, coll, jbl, id); in ejdb_put_jbn()
1355 jbl_destroy(&jbl); in ejdb_put_jbn()
1359 static iwrc _jb_put_new_lw(JBCOLL jbc, JBL jbl, int64_t *id) { in _jb_put_new_lw() argument
1369 .jbl = jbl in _jb_put_new_lw()
1372 RCC(rc, finish, jbl_as_buf(jbl, &val.data, &val.size)); in _jb_put_new_lw()
1384 iwrc ejdb_put_new(EJDB db, const char *coll, JBL jbl, int64_t *id) { in ejdb_put_new() argument
1385 if (!jbl) { in ejdb_put_new()
1396 rc = _jb_put_new_lw(jbc, jbl, id); in ejdb_put_new()
1403 JBL jbl = 0; in ejdb_put_new_jbn() local
1404 iwrc rc = jbl_from_node(&jbl, jbn); in ejdb_put_new_jbn()
1406 rc = ejdb_put_new(db, coll, jbl, id); in ejdb_put_new_jbn()
1407 jbl_destroy(&jbl); in ejdb_put_new_jbn()
1419 JBL jbl = 0; in jb_get() local
1427 RCC(rc, finish, jbl_from_buf_keep(&jbl, val.data, val.size, false)); in jb_get()
1429 *jblp = jbl; in jb_get()
1433 if (jbl) { in jb_get()
1434 jbl_destroy(&jbl); in jb_get()
1450 struct _JBL jbl; in ejdb_del() local
1458 RCC(rc, finish, jbl_from_buf_keep_onstack(&jbl, val.data, val.size)); in ejdb_del()
1461 IWRC(_jb_idx_record_remove(idx, id, &jbl), rc); in ejdb_del()
1476 iwrc jb_del(JBCOLL jbc, JBL jbl, int64_t id) { in jb_del() argument
1480 IWRC(_jb_idx_record_remove(idx, id, jbl), rc); in jb_del()
1489 iwrc jb_cursor_del(JBCOLL jbc, IWKV_cursor cur, int64_t id, JBL jbl) { in jb_cursor_del() argument
1492 IWRC(_jb_idx_record_remove(idx, id, jbl), rc); in jb_cursor_del()
1647 JBL jbl; in ejdb_get_meta() local
1648 iwrc rc = jbl_create_empty_object(&jbl); in ejdb_get_meta()
1652 if (!binn_object_set_str(&jbl->bn, "version", ejdb_version_full())) { in ejdb_get_meta()
1659 if ( !binn_object_set_str(&jbl->bn, "file", sfsm.exfile.file.opts.path) in ejdb_get_meta()
1660 || !binn_object_set_int64(&jbl->bn, "size", sfsm.exfile.fsize)) { in ejdb_get_meta()
1677 if (!binn_object_set_list(&jbl->bn, "collections", clist)) { in ejdb_get_meta()
1690 jbl_destroy(&jbl); in ejdb_get_meta()
1692 *jblp = jbl; in ejdb_get_meta()