@@ -83,7 +83,7 @@ ffi.cdef[[
8383 int use_btree ;
8484 tidesdb_commit_hook_fn commit_hook_fn ;
8585 void * commit_hook_ctx ;
86- size_t object_target_file_size ;
86+ size_t object_target_file_size ; /* reserved, retired from public API */
8787 int object_lazy_compaction ;
8888 int object_prefetch_compaction ;
8989 } tidesdb_column_family_config_t ;
@@ -182,6 +182,7 @@ ffi.cdef[[
182182 int tidesdb_txn_put (void * txn , void * cf , const uint8_t * key , size_t key_len , const uint8_t * value , size_t value_len , int ttl );
183183 int tidesdb_txn_get (void * txn , void * cf , const uint8_t * key , size_t key_len , uint8_t ** value , size_t * value_len );
184184 int tidesdb_txn_delete (void * txn , void * cf , const uint8_t * key , size_t key_len );
185+ int tidesdb_txn_single_delete (void * txn , void * cf , const uint8_t * key , size_t key_len );
185186 int tidesdb_txn_commit (void * txn );
186187 int tidesdb_txn_rollback (void * txn );
187188 void tidesdb_txn_free (void * txn );
@@ -484,7 +485,6 @@ function tidesdb.default_column_family_config()
484485 l1_file_count_trigger = c_config .l1_file_count_trigger ,
485486 l0_queue_stall_threshold = c_config .l0_queue_stall_threshold ,
486487 use_btree = c_config .use_btree ~= 0 ,
487- object_target_file_size = tonumber (c_config .object_target_file_size ),
488488 object_lazy_compaction = c_config .object_lazy_compaction ~= 0 ,
489489 object_prefetch_compaction = c_config .object_prefetch_compaction ~= 0 ,
490490 }
@@ -574,7 +574,6 @@ local function config_to_c_struct(config, cf_name)
574574 c_config .l1_file_count_trigger = config .l1_file_count_trigger or 4
575575 c_config .l0_queue_stall_threshold = config .l0_queue_stall_threshold or 20
576576 c_config .use_btree = config .use_btree and 1 or 0
577- c_config .object_target_file_size = config .object_target_file_size or 0
578577 c_config .object_lazy_compaction = config .object_lazy_compaction and 1 or 0
579578 c_config .object_prefetch_compaction = config .object_prefetch_compaction and 1 or 0
580579
@@ -905,6 +904,19 @@ function Transaction:delete(cf, key)
905904 check_result (result , " failed to delete key" )
906905end
907906
907+ function Transaction :single_delete (cf , key )
908+ if self ._closed then
909+ error (TidesDBError .new (" Transaction is closed" ))
910+ end
911+ if self ._committed then
912+ error (TidesDBError .new (" Transaction already committed" ))
913+ end
914+
915+ local key_len = # key
916+ local result = lib .tidesdb_txn_single_delete (self ._txn , cf ._cf , key , key_len )
917+ check_result (result , " failed to single delete key" )
918+ end
919+
908920function Transaction :commit ()
909921 if self ._closed then
910922 error (TidesDBError .new (" Transaction is closed" ))
@@ -1354,7 +1366,6 @@ function tidesdb.load_config_from_ini(ini_file, section_name)
13541366 l1_file_count_trigger = c_config .l1_file_count_trigger ,
13551367 l0_queue_stall_threshold = c_config .l0_queue_stall_threshold ,
13561368 use_btree = c_config .use_btree ~= 0 ,
1357- object_target_file_size = tonumber (c_config .object_target_file_size ),
13581369 object_lazy_compaction = c_config .object_lazy_compaction ~= 0 ,
13591370 object_prefetch_compaction = c_config .object_prefetch_compaction ~= 0 ,
13601371 }
@@ -1367,6 +1378,6 @@ function tidesdb.save_config_to_ini(ini_file, section_name, config)
13671378end
13681379
13691380-- Version
1370- tidesdb ._VERSION = " 0.5.8 "
1381+ tidesdb ._VERSION = " 0.6.0 "
13711382
13721383return tidesdb
0 commit comments