View Source Duckdbex.Config (Duckdbex v0.1.0)

DuckDB database instance configuration.

Link to this section Summary

Types

t()

DuckDB database instance configuration type.

Link to this section Types

@type t() :: %Duckdbex.Config{
  access_mode: :automatic | :read_only | :read_write,
  checkpoint_on_shutdown: boolean(),
  checkpoint_wal_size: pos_integer(),
  collation: binary(),
  default_null_order: :nulls_firs | :nulls_last,
  default_order_type: :asc | :desc,
  enable_external_access: boolean(),
  force_bitpacking_mode:
    :auto | :constant | :constant_delta | :delta_for | :for,
  force_checkpoint: boolean(),
  force_compression:
    :auto
    | :uncompressed
    | :constant
    | :rle
    | :dictionary
    | :pfor_delta
    | :bitpacking
    | :fsst
    | :chimp
    | :patas,
  immediate_transaction_mode: boolean(),
  maximum_memory: pos_integer(),
  maximum_threads: pos_integer(),
  memory_allocator: :duckdb | :erlang,
  object_cache_enable: boolean(),
  preserve_insertion_order: boolean(),
  temporary_directory: binary(),
  use_direct_io: boolean(),
  use_temporary_directory: boolean()
}

DuckDB database instance configuration type.

:access_mode: Access mode of the database. Maybe :automatic, :read_only or :read_write. Default: :automatic.

:checkpoint_wal_size: Checkpoint when WAL reaches this size. Default: 16777216 (16MB).

:use_direct_io: Whether or not to use Direct IO, bypassing operating system buffers. Default: false.

:maximum_memory: The maximum memory used by the database system (in bytes). Default: nil (80% of System available memory)

:maximum_threads: The maximum amount of native CPU threads used by the database system. Default: nil (all available).

:use_temporary_directory: Whether or not to create and use a temporary directory to store intermediates that do not fit in memory. Default: true

:temporary_directory: Directory to store temporary structures that do not fit in memory. Default: nil (current)

:collation: The collation type of the database. Deafault: nil

:default_order_type: The order type used when none is specified. Maybe :asc, :desc. Deafult: :asc.

:default_null_order: Null ordering used when none is specified. Maybe :nulls_firs, :nulls_last. Default: :nulls_firs.

:enable_external_access: Enable COPY and related commands. Default: true.

:object_cache_enable: Whether or not object cache is used. Default: false.

:force_checkpoint: Force checkpoint when CHECKPOINT is called or on shutdown, even if no changes have been made. Default: false.

:checkpoint_on_shutdown: Run a checkpoint on successful shutdown and delete the WAL, to leave only a single database file behind. Default: true.

:force_compression: Force a specific compression method to be used when checkpointing (if available). Maybe :auto, :uncompressed, :constant, :rle, :dictionary, :pfor_delta, :bitpacking, :fsst, :chimp, :patas. Default: :auto.

:force_bitpacking_mode: Force a specific bitpacking mode to be used when using the bitpacking compression method. Maybe :auto, :constant, :constant_delta, :delta_for, :for. Default: :auto.

:preserve_insertion_order: Whether or not preserving insertion order should be preserved. Default: true.

:immediate_transaction_mode: Start transactions immediately in all attached databases - instead of lazily when a database is referenced. Default: false.

:memory_allocator: The memory allocator used by the database system. Maybe :duckdb - native DuckDB allocator or :erlang - erlang 'void *enif_alloc(size_t size)' allocator. Default: :duckdb.