Options

Database creation and general usgage options

Constructors

this
this()

Create the internal option object

Destructor

~this
~this()

Destroy any valid option pointer

Members

Classes

AFilterPolicy
class AFilterPolicy

User Filter Policy

BloomFilterPolicy
class BloomFilterPolicy

Bloom filter

Comparator
class Comparator

User Comparator, this is a default string comparator

Environment
class Environment

Environment object, API only has deault environment

LRUCache
class LRUCache

Cache Object, can only set size

Properties

block_restart_interval
int block_restart_interval [@property setter]

Number of keys between restart points for delta encoding of keys. This parameter can be changed dynamically. Most clients should leave this parameter alone.

block_size
size_t block_size [@property setter]

Approximate size of user data packed per block. Note that the block size specified here corresponds to uncompressed data. The actual size of the unit read from disk may be smaller if compression is enabled. This parameter can be changed dynamically.

cache
Cache cache [@property setter]

Control over blocks (user data is stored in a set of blocks, and a block is the unit of reading from disk).

comparator
Comparator comparator [@property setter]

Comparator used to define the order of keys in the table. Default: a comparator that uses lexicographic byte-wise ordering

compression
int compression [@property setter]

Compress blocks using the specified compression algorithm. This parameter can be changed dynamically.

create_if_missing
bool create_if_missing [@property setter]

If true, the database will be created if it is missing. Default: false

env
Environment env [@property setter]

Use the specified object to interact with the environment, e.g. to read/write files, schedule background work, etc. Default: Environment()

error_if_missing
bool error_if_missing [@property setter]

If true, an error is raised if the database already exists. Default: false

filter_policy
FilterPolicy filter_policy [@property setter]

If non-NULL, use the specified filter policy to reduce disk reads. Many applications will benefit from passing the result of BloomFilterPolicy here.

max_open_files
int max_open_files [@property setter]

Number of open files that can be used by the DB. You may need to increase this if your database has a large working set (budget one open file per 2MB of working set).

paranoid_checks
bool paranoid_checks [@property setter]

If true, the implementation will do aggressive checking of the data it is processing and will stop early if it detects any errors. This may have unforeseen ramifications: for example, a corruption of one DB entry may cause a large number of entries to become unreadable or for the entire DB to become unopenable. Default: false

valid
bool valid [@property getter]

indicates if the option has been created

write_buffer_size
size_t write_buffer_size [@property setter]

Parameters that affect performance Amount of data to build up in memory (backed by an unsorted log on disk) before converting to a sorted on-disk file.

Meta