Crate offline_first_core

Source

Modules§

local_db_model
local_db_state

Functions§

cleanup_stale_instances
Cleanup function to remove stale instances Should be called periodically to clean up old instances
clear_all_records
close_database
Properly closes a database connection and frees all associated resources This function should be called before hot restart or app termination
create_db
delete_by_id
free_c_string
Frees memory allocated for C string responses Should be called after consuming the response from any FFI function
get_all
get_by_id
get_current_generation
Get the current generation counter value
invalidate_instance
Mark an instance as invalid (useful for hot reload scenarios)
is_database_valid
Validates that a database pointer is still valid and registered Also updates last_used timestamp for the instance
ping_database
Ping function for heartbeat monitoring Returns the current generation and status of the instance
push_data
reset_database
update_data
validate_instance_generation
Validates that a database instance is from the expected generation This helps detect hot reload scenarios where instances become stale