View Source erlfdb_nif (erlfdb v0.1.0)

Summary

Functions

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 atomic_operand() :: integer() | binary().
-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 future() :: {erlfdb_future, reference(), reference()}.
-type future_result() ::
    database() |
    integer() |
    value() |
    {[{key(), value()}], integer(), boolean()} |
    not_found | [] |
    [{key(), value()}] |
    ok.
-type key() :: binary().
-type key_selector() ::
    {Key :: binary(), lt | lteq | gt | gteq} |
    {Key :: binary(), OrEqual :: boolean(), Offset :: integer()}.
-type network_option() ::
    local_address | cluster_file | trace_enable | trace_format | trace_roll_size |
    trace_max_logs_size | trace_log_group | knob | tls_plugin | tls_cert_bytes | tls_cert_path |
    tls_key_bytes | tls_key_path | tls_verify_peers | client_buggify_enable |
    client_buggify_disable | client_buggify_section_activated_probability |
    client_buggify_section_fired_probability | tls_ca_bytes | tls_ca_path | tls_password |
    disable_multi_version_client_api | callbacks_on_external_threads | external_client_library |
    external_client_directory | disable_local_client | disable_client_statistics_logging |
    enable_slow_task_profiling | enable_run_loop_profiling.
-type option_value() :: integer() | 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

Link to this function

create_database(ClusterFilePath)

View Source
-spec create_database(ClusterFilePath :: binary()) -> database().
Link to this function

database_create_transaction(_)

View Source
-spec database_create_transaction(database()) -> transaction().
Link to this function

database_open_tenant(Database, TenantName)

View Source
-spec database_open_tenant(database(), TenantName :: binary()) -> tenant().
Link to this function

database_set_option(Database, Option)

View Source
-spec database_set_option(database(), Option :: database_option()) -> ok.
Link to this function

database_set_option(_, Option, Value)

View Source
-spec database_set_option(database(), Option :: database_option(), Value :: option_value()) -> ok.
Link to this function

error_predicate(Predicate, Error)

View Source
-spec error_predicate(Predicate :: error_predicate(), Error :: integer()) -> boolean().
-spec future_cancel(future()) -> ok.
-spec future_get(future()) -> future_result().
-spec future_get_error(future()) -> error().
-spec future_is_ready(future()) -> boolean().
-spec future_silence(future()) -> ok.
-spec get_error(integer()) -> binary().
-spec get_max_api_version() -> {ok, integer()}.
Link to this function

tenant_create_transaction(_)

View Source
-spec tenant_create_transaction(tenant()) -> transaction().
Link to this function

transaction_add_conflict_range(_, StartKey, EndKey, ConflictType)

View Source
-spec transaction_add_conflict_range(transaction(),
                               StartKey :: binary(),
                               EndKey :: binary(),
                               ConflictType :: conflict_type()) ->
                                  ok.
Link to this function

transaction_atomic_op(_, Key, Operand, Mode)

View Source
-spec transaction_atomic_op(transaction(),
                      Key :: binary(),
                      Operand :: atomic_operand(),
                      Mode :: atomic_mode()) ->
                         ok.
-spec transaction_cancel(transaction()) -> ok.
Link to this function

transaction_clear(_, Key)

View Source
-spec transaction_clear(transaction(), Key :: binary()) -> ok.
Link to this function

transaction_clear_range(_, StartKey, EndKey)

View Source
-spec transaction_clear_range(transaction(), StartKey :: binary(), EndKey :: binary()) -> ok.
-spec transaction_commit(transaction()) -> future().
Link to this function

transaction_get(_, Key, Snapshot)

View Source
-spec transaction_get(transaction(), Key :: binary(), Snapshot :: boolean()) -> future().
Link to this function

transaction_get_addresses_for_key(_, Key)

View Source
-spec transaction_get_addresses_for_key(transaction(), Key :: binary()) -> future().
Link to this function

transaction_get_approximate_size(_)

View Source
-spec transaction_get_approximate_size(transaction()) -> non_neg_integer().
Link to this function

transaction_get_committed_version(_)

View Source
-spec transaction_get_committed_version(transaction()) -> integer().
Link to this function

transaction_get_estimated_range_size(_, StartKey, EndKey)

View Source
-spec transaction_get_estimated_range_size(transaction(), StartKey :: binary(), EndKey :: binary()) ->
                                        future().
Link to this function

transaction_get_key(_, KeySelector, Snapshot)

View Source
-spec transaction_get_key(transaction(), KeySelector :: key_selector(), Snapshot :: boolean()) ->
                       future().
Link to this function

transaction_get_mapped_range(_, StartKeySelector, EndKeySelector, Mapper, Limit, TargetBytes, StreamingMode, Iteration, Snapshot, Reverse)

View Source
-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().
Link to this function

transaction_get_next_tx_id(_)

View Source
-spec transaction_get_next_tx_id(transaction()) -> non_neg_integer().
Link to this function

transaction_get_range(_, StartKeySelector, EndKeySelector, Limit, TargetBytes, StreamingMode, Iteration, Snapshot, Reverse)

View Source
-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().
Link to this function

transaction_get_read_version(_)

View Source
-spec transaction_get_read_version(transaction()) -> future().
Link to this function

transaction_get_versionstamp(_)

View Source
-spec transaction_get_versionstamp(transaction()) -> future().
Link to this function

transaction_get_writes_allowed(_)

View Source
-spec transaction_get_writes_allowed(transaction()) -> true | false.
Link to this function

transaction_has_watches(_)

View Source
-spec transaction_has_watches(transaction()) -> true | false.
Link to this function

transaction_is_read_only(_)

View Source
-spec transaction_is_read_only(transaction()) -> true | false.
Link to this function

transaction_on_error(_, Error)

View Source
-spec transaction_on_error(transaction(), Error :: integer()) -> future().
-spec transaction_reset(transaction()) -> ok.
Link to this function

transaction_set(_, Key, Val)

View Source
-spec transaction_set(transaction(), Key :: binary(), Val :: binary()) -> ok.
Link to this function

transaction_set_option(Transaction, Option)

View Source
-spec transaction_set_option(transaction(), Option :: transaction_option()) -> ok.
Link to this function

transaction_set_option(_, Option, Value)

View Source
-spec transaction_set_option(transaction(), Option :: transaction_option(), Value :: option_value()) ->
                          ok.
Link to this function

transaction_set_read_version(_, Version)

View Source
-spec transaction_set_read_version(transaction(), Version :: integer()) -> ok.
Link to this function

transaction_watch(_, Key)

View Source
-spec transaction_watch(transaction(), Key :: binary()) -> future().