Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/sdb/sdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ SDB_API char *sdb_querys(Sdb* s, char *buf, size_t len, const char *cmd);
SDB_API char *sdb_querysf(Sdb* s, char *buf, size_t buflen, const char *fmt, ...);
SDB_API int sdb_query_file(Sdb *s, const char* file);
SDB_API bool sdb_exists(Sdb*, const char *key);
SDB_API bool sdb_remove(Sdb*, const char *key, ut32 cas);
SDB_API int sdb_unset(Sdb*, const char *key, ut32 cas);
SDB_API int sdb_nunset(Sdb*, ut64 nkey, ut32 cas);
SDB_API int sdb_unset_like(Sdb *s, const char *k);
Expand Down
7 changes: 1 addition & 6 deletions src/sdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,6 @@ SDB_API int sdb_nunset(Sdb* s, ut64 nkey, ut32 cas) {
return sdb_nset (s, nkey, "", cas);
}

/* remove from memory */
SDB_API bool sdb_remove(Sdb *s, const char *key, ut32 cas) {
return sdb_ht_delete (s->ht, key);
}

// alias for '-key=str'.. '+key=str' concats
SDB_API int sdb_uncat(Sdb *s, const char *key, const char *value, ut32 cas) {
// remove 'value' from current key value.
Expand Down Expand Up @@ -901,7 +896,7 @@ SDB_API bool sdb_sync(Sdb* s) {
const char *kvv = sdbkv_value (kv);
if (kvv && *kvv && !kv->expire) {
if (sdb_disk_insert (s, sdbkv_key (kv), sdbkv_value (kv))) {
sdb_remove (s, sdbkv_key (kv), 0);
return sdb_ht_delete (s->ht, sdbkv_key (kv));
}
}
}
Expand Down