View Source erlfdb_nif (erlfdb v0.3.1)
The NIF wrapper around all FoundationDB C API function calls.
Tip
Use
erlfdb
instead.
Summary
Types
-type atomic_mode() ::
add | bit_and | bit_or | bit_xor | append_if_fits | max | min | byte_min | byte_max |
set_versionstamped_key | set_versionstamped_value.
-type conflict_type() :: read | write.
-type database() :: {erlfdb_database, reference()}.
-type database_option() :: location_cache_size | max_watches | machine_id | datacenter_id.
-type error() :: {erlfdb_error, Code :: integer()}.
-type error_predicate() :: retryable | maybe_committed | retryable_not_committed.
-type key() :: binary().
-type streaming_mode() ::
stream_want_all | stream_iterator | stream_exact | stream_small | stream_medium |
stream_large | stream_serial.
-type tenant() :: {erlfdb_tenant, reference()}.
-type transaction() :: {erlfdb_transaction, reference()}.
-type transaction_option() ::
causal_write_risky | causal_read_risky | causal_read_disable |
next_write_no_write_conflict_range | read_your_writes_disable | read_ahead_disable |
durability_datacenter | durability_risky | durability_dev_null_is_web_scale |
priority_system_immediate | priority_batch | initialize_new_database | access_system_keys |
read_system_keys | debug_retry_logging | transaction_logging_enable | timeout | retry_limit |
max_retry_delay | snapshot_ryw_enable | snapshot_ryw_disable | lock_aware |
used_during_commit_protection_disable | read_lock_aware | size_limit | allow_writes |
disallow_writes.
-type value() :: binary().
-type version() :: integer().
Functions
-spec database_create_transaction(database()) -> transaction().
-spec database_set_option(database(), Option :: database_option()) -> ok.
-spec database_set_option(database(), Option :: database_option(), Value :: option_value()) -> ok.
-spec error_predicate(Predicate :: error_predicate(), Error :: integer()) -> boolean().
-spec future_cancel(future()) -> ok.
-spec future_get(future()) -> future_result().
-spec future_silence(future()) -> ok.
-spec get_max_api_version() -> {ok, integer()}.
-spec tenant_create_transaction(tenant()) -> transaction().
-spec transaction_add_conflict_range(transaction(), StartKey :: binary(), EndKey :: binary(), ConflictType :: conflict_type()) -> ok.
-spec transaction_atomic_op(transaction(), Key :: binary(), Operand :: atomic_operand(), Mode :: atomic_mode()) -> ok.
-spec transaction_cancel(transaction()) -> ok.
-spec transaction_clear(transaction(), Key :: binary()) -> ok.
-spec transaction_clear_range(transaction(), StartKey :: binary(), EndKey :: binary()) -> ok.
-spec transaction_commit(transaction()) -> future().
-spec transaction_get(transaction(), Key :: binary(), Snapshot :: boolean()) -> future().
-spec transaction_get_addresses_for_key(transaction(), Key :: binary()) -> future().
-spec transaction_get_approximate_size(transaction()) -> non_neg_integer().
-spec transaction_get_committed_version(transaction()) -> integer().
-spec transaction_get_estimated_range_size(transaction(), StartKey :: binary(), EndKey :: binary()) -> future().
-spec transaction_get_key(transaction(), KeySelector :: key_selector(), Snapshot :: boolean()) -> future().
-spec transaction_get_mapped_range(transaction(), StartKeySelector :: key_selector(), EndKeySelector :: key_selector(), Mapper :: binary(), Limit :: non_neg_integer(), TargetBytes :: non_neg_integer(), StreamingMode :: streaming_mode(), Iteration :: non_neg_integer(), Snapshot :: boolean(), Reverse :: integer()) -> future().
-spec transaction_get_next_tx_id(transaction()) -> non_neg_integer().
-spec transaction_get_range(transaction(), StartKeySelector :: key_selector(), EndKeySelector :: key_selector(), Limit :: non_neg_integer(), TargetBytes :: non_neg_integer(), StreamingMode :: streaming_mode(), Iteration :: non_neg_integer(), Snapshot :: boolean(), Reverse :: integer()) -> future().
-spec transaction_get_range_split_points(transaction(), StartKey :: binary(), EndKey :: binary(), ChunkSize :: non_neg_integer()) -> future().
-spec transaction_get_read_version(transaction()) -> future().
-spec transaction_get_versionstamp(transaction()) -> future().
-spec transaction_get_writes_allowed(transaction()) -> true | false.
-spec transaction_has_watches(transaction()) -> true | false.
-spec transaction_is_read_only(transaction()) -> true | false.
-spec transaction_on_error(transaction(), Error :: integer()) -> future().
-spec transaction_reset(transaction()) -> ok.
-spec transaction_set(transaction(), Key :: binary(), Val :: binary()) -> ok.
-spec transaction_set_option(transaction(), Option :: transaction_option()) -> ok.
-spec transaction_set_option(transaction(), Option :: transaction_option(), Value :: option_value()) -> ok.
-spec transaction_set_read_version(transaction(), Version :: integer()) -> ok.
-spec transaction_watch(transaction(), Key :: binary()) -> future().