@@ -87,6 +87,8 @@ def shlib_name(library: str) -> str:
8787OBXLogLevel = ctypes .c_int
8888
8989from enum import IntEnum
90+
91+
9092class LogLevel (IntEnum ):
9193 Verbose = 10
9294 Debug = 20
@@ -581,7 +583,7 @@ def c_array_pointer(py_list: Union[List[Any], np.ndarray], c_type):
581583obx_opt_async_object_bytes_max_size_to_cache = c_fn ('obx_opt_async_object_bytes_max_size_to_cache' , None ,
582584 [OBX_store_options_p , ctypes .c_uint64 ])
583585
584- #typedef void obx_log_callback(OBXLogLevel log_level, const char* message, size_t message_size, void* user_data);
586+ # typedef void obx_log_callback(OBXLogLevel log_level, const char* message, size_t message_size, void* user_data);
585587obx_log_callback_fn = ctypes .CFUNCTYPE (None , OBXLogLevel , ctypes .c_char_p , ctypes .c_size_t , ctypes .c_voidp )
586588
587589# OBX_C_API void obx_opt_log_callback(OBX_store_options* opt, obx_log_callback* callback, void* user_data);
@@ -633,10 +635,16 @@ def c_array_pointer(py_list: Union[List[Any], np.ndarray], c_type):
633635# OBX_box* (OBX_store* store, obx_schema_id entity_id);
634636obx_box = c_fn ('obx_box' , OBX_box_p , [OBX_store_p , obx_schema_id ])
635637
638+ # OBX_C_API obx_err obx_box_contains(OBX_box* box, obx_id id, bool* out_contains);
639+ obx_box_contains = c_fn_rc ('obx_box_contains' , [OBX_box_p , obx_id , ctypes .POINTER (ctypes .c_bool )])
640+
636641# obx_err (OBX_box* box, obx_id id, const void** data, size_t* size);
637642obx_box_get = c_fn_nocheck ('obx_box_get' , obx_err , [
638643 OBX_box_p , obx_id , ctypes .POINTER (ctypes .c_void_p ), ctypes .POINTER (ctypes .c_size_t )])
639644
645+ # OBX_C_API OBX_bytes_array* obx_box_get_many(OBX_box* box, const OBX_id_array* ids);
646+ obx_box_get_many = c_fn ('obx_box_get_many' , OBX_bytes_array_p , [OBX_box_p , OBX_id_array_p ])
647+
640648# OBX_bytes_array* (OBX_box* box);
641649obx_box_get_all = c_fn ('obx_box_get_all' , OBX_bytes_array_p , [OBX_box_p ])
642650
@@ -650,24 +658,29 @@ def c_array_pointer(py_list: Union[List[Any], np.ndarray], c_type):
650658# obx_err (OBX_box* box, obx_id id, const void* data, size_t size);
651659obx_box_put = c_fn_rc ('obx_box_put' , [OBX_box_p , obx_id , ctypes .c_void_p , ctypes .c_size_t ])
652660
661+ # OBX_C_API obx_err obx_box_insert(OBX_box* box, obx_id id, const void* data, size_t size);
662+ obx_box_insert = c_fn_rc ('obx_box_insert' , [OBX_box_p , obx_id , ctypes .c_void_p , ctypes .c_size_t ])
663+
664+ # OBX_C_API obx_err obx_box_update(OBX_box* box, obx_id id, const void* data, size_t size);
665+ obx_box_update = c_fn_rc ('obx_box_update' , [OBX_box_p , obx_id , ctypes .c_void_p , ctypes .c_size_t ])
666+
653667# obx_err (OBX_box* box, const OBX_bytes_array* objects, const obx_id* ids, OBXPutMode mode);
654- obx_box_put_many = c_fn_rc ('obx_box_put_many' , [
655- OBX_box_p , OBX_bytes_array_p , ctypes .POINTER (obx_id ), OBXPutMode ])
668+ obx_box_put_many = c_fn_rc ('obx_box_put_many' , [OBX_box_p , OBX_bytes_array_p , ctypes .POINTER (obx_id ), OBXPutMode ])
656669
657670# obx_err (OBX_box* box, obx_id id);
658671obx_box_remove = c_fn_nocheck ('obx_box_remove' , obx_err , [OBX_box_p , obx_id ])
659672
660- # obx_err (OBX_box* box, uint64_t* out_count);
661- obx_box_remove_all = c_fn_rc ('obx_box_remove_all' , [
662- OBX_box_p , ctypes .POINTER (ctypes .c_uint64 )])
673+ # OBX_C_API obx_err obx_box_remove_many(OBX_box* box, const OBX_id_array* ids, uint64_t* out_count);
674+ obx_box_remove_many = c_fn_rc ('obx_box_remove_many' , [OBX_box_p , OBX_id_array_p , ctypes .POINTER (ctypes .c_uint64 )])
675+
676+ # OBX_C_API obx_err obx_box_remove_all(OBX_box* box, uint64_t* out_count);
677+ obx_box_remove_all = c_fn_rc ('obx_box_remove_all' , [OBX_box_p , ctypes .POINTER (ctypes .c_uint64 )])
663678
664- # obx_err (OBX_box* box, bool* out_is_empty);
665- obx_box_is_empty = c_fn_rc ('obx_box_is_empty' , [
666- OBX_box_p , ctypes .POINTER (ctypes .c_bool )])
679+ # OBX_C_API obx_err obx_box_is_empty(OBX_box* box, bool* out_is_empty);
680+ obx_box_is_empty = c_fn_rc ('obx_box_is_empty' , [OBX_box_p , ctypes .POINTER (ctypes .c_bool )])
667681
668- # obx_err obx_box_count(OBX_box* box, uint64_t limit, uint64_t* out_count);
669- obx_box_count = c_fn_rc ('obx_box_count' , [
670- OBX_box_p , ctypes .c_uint64 , ctypes .POINTER (ctypes .c_uint64 )])
682+ # OBX_C_API obx_err obx_box_count(OBX_box* box, uint64_t limit, uint64_t* out_count);
683+ obx_box_count = c_fn_rc ('obx_box_count' , [OBX_box_p , ctypes .c_uint64 , ctypes .POINTER (ctypes .c_uint64 )])
671684
672685# OBX_query_builder* obx_query_builder(OBX_store* store, obx_schema_id entity_id);
673686obx_query_builder = c_fn ('obx_query_builder' , OBX_query_builder_p , [OBX_store_p , obx_schema_id ])
0 commit comments