• Home
  • Raw
  • Download

Lines Matching refs:dbid

9 IW_INLINE iwrc _jb_meta_nrecs_removedb(EJDB db, uint32_t dbid) {  in _jb_meta_nrecs_removedb()  argument
10 dbid = IW_HTOIL(dbid); in _jb_meta_nrecs_removedb()
12 .size = sizeof(dbid), in _jb_meta_nrecs_removedb()
13 .data = &dbid in _jb_meta_nrecs_removedb()
18 IW_INLINE iwrc _jb_meta_nrecs_update(EJDB db, uint32_t dbid, int64_t delta) { in _jb_meta_nrecs_update() argument
20 dbid = IW_HTOIL(dbid); in _jb_meta_nrecs_update()
26 .size = sizeof(dbid), in _jb_meta_nrecs_update()
27 .data = &dbid in _jb_meta_nrecs_update()
32 static int64_t _jb_meta_nrecs_get(EJDB db, uint32_t dbid) { in _jb_meta_nrecs_get() argument
35 dbid = IW_HTOIL(dbid); in _jb_meta_nrecs_get()
37 .size = sizeof(dbid), in _jb_meta_nrecs_get()
38 .data = &dbid in _jb_meta_nrecs_get()
88 || !binn_object_get_uint32(bn, "dbid", &idx->dbid)) { in _jb_coll_load_index_lr()
95 rc = iwkv_db(jbc->db->iwkv, idx->dbid, idx->idbf, &idx->idb); in _jb_coll_load_index_lr()
98 idx->rnum = _jb_meta_nrecs_get(jbc->db, idx->dbid); in _jb_coll_load_index_lr()
115 int sz = snprintf(buf, sizeof(buf), KEY_PREFIX_IDXMETA "%u.", jbc->dbid); in _jb_coll_load_indexes_lr()
165 jbc->dbid = (uint32_t) jbl_get_i64(jbv); in _jb_coll_load_meta_lr()
167 if (!jbc->dbid) { in _jb_coll_load_meta_lr()
170 rc = iwkv_db(jbc->db->iwkv, jbc->dbid, IWDB_VNUM64_KEYS, &jbc->cdb); in _jb_coll_load_meta_lr()
173 jbc->rnum = _jb_meta_nrecs_get(jbc->db, jbc->dbid); in _jb_coll_load_meta_lr()
244 || !binn_object_set_uint32(meta, "dbid", idx->dbid) in _jb_idx_add_meta_lr()
268 || !binn_object_set_uint32(meta, "dbid", jbc->dbid) in _jb_coll_add_meta_lr()
420 uint32_t dbid = 0; in _jb_coll_acquire_keeplock2() local
424 rc = iwkv_new_db(db->iwkv, IWDB_VNUM64_KEYS, &dbid, &cdb); in _jb_coll_acquire_keeplock2()
437 if (!binn_object_set_uint32(&meta->bn, "id", dbid)) { in _jb_coll_acquire_keeplock2()
444 key.size = snprintf(keybuf, sizeof(keybuf), KEY_PREFIX_COLLMETA "%u", dbid); in _jb_coll_acquire_keeplock2()
649 if (delta && !_jb_meta_nrecs_update(idx->jbc->db, idx->dbid, delta)) { in _jb_idx_record_add()
715 _jb_meta_nrecs_update(jbc->db, jbc->dbid, 1); in _jb_put_handler_after()
1126 …ey.size = snprintf(keybuf, sizeof(keybuf), KEY_PREFIX_IDXMETA "%u" "." "%u", jbc->dbid, idx->dbid); in ejdb_remove_index()
1133 _jb_meta_nrecs_removedb(db, idx->dbid); in ejdb_remove_index()
1209 rc = iwkv_new_db(db->iwkv, idx->idbf, &idx->dbid, &idx->idb); in ejdb_ensure_index()
1225 || !binn_object_set_uint32(imeta, "dbid", idx->dbid)) { in ejdb_ensure_index()
1232 …ey.size = snprintf(keybuf, sizeof(keybuf), KEY_PREFIX_IDXMETA "%u" "." "%u", jbc->dbid, idx->dbid); in ejdb_ensure_index()
1518 _jb_meta_nrecs_update(jbc->db, jbc->dbid, -1); in ejdb_del()
1537 _jb_meta_nrecs_update(jbc->db, jbc->dbid, -1); in jb_del()
1549 _jb_meta_nrecs_update(jbc->db, jbc->dbid, -1); in jb_cursor_del()
1579 key.size = snprintf(keybuf, sizeof(keybuf), KEY_PREFIX_COLLMETA "%u", jbc->dbid); in ejdb_remove_collection()
1583 _jb_meta_nrecs_removedb(db, jbc->dbid); in ejdb_remove_collection()
1587 …ey.size = snprintf(keybuf, sizeof(keybuf), KEY_PREFIX_IDXMETA "%u" "." "%u", jbc->dbid, idx->dbid); in ejdb_remove_collection()
1590 _jb_meta_nrecs_removedb(db, idx->dbid); in ejdb_remove_collection()
1665 if (!binn_object_set_uint32(&nmeta->bn, "id", jbc->dbid)) { in ejdb_rename_collection()
1672 key.size = snprintf(keybuf, sizeof(keybuf), KEY_PREFIX_COLLMETA "%u", jbc->dbid); in ejdb_rename_collection()