#[repr(C)]pub struct __wt_connection {Show 20 fields
pub async_flush: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION) -> c_int>,
pub async_new_op: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, uri: *const c_char, config: *const c_char, callback: *mut WT_ASYNC_CALLBACK, asyncopp: *mut *mut WT_ASYNC_OP) -> c_int>,
pub close: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, config: *const c_char) -> c_int>,
pub debug_info: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, config: *const c_char) -> c_int>,
pub reconfigure: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, config: *const c_char) -> c_int>,
pub get_home: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION) -> *const c_char>,
pub configure_method: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, method: *const c_char, uri: *const c_char, config: *const c_char, type_: *const c_char, check: *const c_char) -> c_int>,
pub is_new: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION) -> c_int>,
pub open_session: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, event_handler: *mut WT_EVENT_HANDLER, config: *const c_char, sessionp: *mut *mut WT_SESSION) -> c_int>,
pub query_timestamp: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, hex_timestamp: *mut c_char, config: *const c_char) -> c_int>,
pub set_timestamp: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, config: *const c_char) -> c_int>,
pub rollback_to_stable: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, config: *const c_char) -> c_int>,
pub load_extension: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, path: *const c_char, config: *const c_char) -> c_int>,
pub add_data_source: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, prefix: *const c_char, data_source: *mut WT_DATA_SOURCE, config: *const c_char) -> c_int>,
pub add_collator: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, name: *const c_char, collator: *mut WT_COLLATOR, config: *const c_char) -> c_int>,
pub add_compressor: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, name: *const c_char, compressor: *mut WT_COMPRESSOR, config: *const c_char) -> c_int>,
pub add_encryptor: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, name: *const c_char, encryptor: *mut WT_ENCRYPTOR, config: *const c_char) -> c_int>,
pub add_extractor: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, name: *const c_char, extractor: *mut WT_EXTRACTOR, config: *const c_char) -> c_int>,
pub set_file_system: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, fs: *mut WT_FILE_SYSTEM, config: *const c_char) -> c_int>,
pub get_extension_api: Option<unsafe extern "C" fn(wt_conn: *mut WT_CONNECTION) -> *mut WT_EXTENSION_API>,
}Expand description
A connection to a WiredTiger database. The connection may be opened within the same address space as the caller or accessed over a socket connection.
Most applications will open a single connection to a database for each process. The first process to open a connection to a database will access the database in its own address space. Subsequent connections (if allowed) will communicate with the first process over a socket connection to perform their operations.
Thread safety: A WT_CONNECTION handle may be shared between threads, see @ref threads for more information.
Fields§
§async_flush: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION) -> c_int>@name Async operation handles @{ / /*! Wait for all outstanding operations to complete.
@snippet ex_async.c async flush
@param connection the connection handle @errors
async_new_op: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, uri: *const c_char, config: *const c_char, callback: *mut WT_ASYNC_CALLBACK, asyncopp: *mut *mut WT_ASYNC_OP) -> c_int>Return an async operation handle
@snippet ex_async.c async handle allocation
@param connection the connection handle @param uri the connection handle @configstart{WT_CONNECTION.async_new_op, see dist/api_data.py} @config{append, append the value as a new record, creating a new record number key; valid only for operations with record number keys., a boolean flag; default \c false.} @config{overwrite, configures whether the cursor’s insert, update and remove methods check the existing state of the record. If \c overwrite is \c false, WT_CURSOR::insert fails with ::WT_DUPLICATE_KEY if the record exists, WT_CURSOR::update and WT_CURSOR::remove fail with ::WT_NOTFOUND if the record does not exist., a boolean flag; default \c true.} @config{raw, ignore the encodings for the key and value, manage data as if the formats were \c “u”. See @ref cursor_raw for details., a boolean flag; default \c false.} @config{timeout, maximum amount of time to allow for compact in seconds. The actual amount of time spent in compact may exceed the configured value. A value of zero disables the timeout., an integer; default \c 1200.} @configend @param callback the operation callback @param[out] asyncopp the new op handle @errors If there are no available handles, \c EBUSY is returned.
close: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, config: *const c_char) -> c_int>Close a connection.
Any open sessions will be closed.
@snippet ex_all.c Close a connection
@param connection the connection handle @configstart{WT_CONNECTION.close, see dist/api_data.py} @config{leak_memory, don’t free memory during close., a boolean flag; default \c false.} @config{use_timestamp, by default, create the close checkpoint as of the last stable timestamp if timestamps are in use, or all current updates if there is no stable timestamp set. If false, this option generates a checkpoint with all updates., a boolean flag; default \c true.} @configend @errors
debug_info: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, config: *const c_char) -> c_int>Output debug information for various subsystems. The output format may change over time, gathering the debug information may be invasive, and the information reported may not provide a point in time view of the system.
@param connection the connection handle @configstart{WT_CONNECTION.debug_info, see dist/api_data.py} @config{cache, print cache information., a boolean flag; default \c false.} @config{cursors, print all open cursor information., a boolean flag; default \c false.} @config{handles, print open handles information., a boolean flag; default \c false.} @config{log, print log information., a boolean flag; default \c false.} @config{sessions, print open session information., a boolean flag; default \c false.} @config{txn, print global txn information., a boolean flag; default \c false.} @configend @errors
reconfigure: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, config: *const c_char) -> c_int>Reconfigure a connection handle.
@snippet ex_all.c Reconfigure a connection
@param connection the connection handle
@configstart{WT_CONNECTION.reconfigure, see dist/api_data.py}
@config{async = (, asynchronous operations configuration options., a
set of related configuration options defined below.}
@config{ enabled, enable asynchronous
operation., a boolean flag; default \c false.}
@config{ ops_max, maximum number of expected
simultaneous asynchronous operations., an integer between 1 and 4096;
default \c 1024.}
@config{ threads, the number
of worker threads to service asynchronous requests. Each worker
thread uses a session from the configured session_max., an integer
between 1 and 20; default \c 2.}
@config{ ),,}
@config{cache_overhead, assume the heap allocator overhead is the
specified percentage, and adjust the cache usage by that amount (for
example, if there is 10GB of data in cache, a percentage of 10
means WiredTiger treats this as 11GB). This value is configurable
because different heap allocators have different overhead and
different workloads will have different heap allocation sizes and
patterns, therefore applications may need to adjust this value based
on allocator choice and behavior in measured workloads., an integer
between 0 and 30; default \c 8.}
@config{cache_size, maximum heap memory to allocate for the cache. A
database should configure either \c cache_size or \c shared_cache but
not both., an integer between 1MB and 10TB; default \c 100MB.}
@config{checkpoint = (, periodically checkpoint the database.
Enabling the checkpoint server uses a session from the configured
session_max., a set of related configuration options defined below.}
@config{ log_size, wait for this amount of log
record bytes to be written to the log between each checkpoint. If
non-zero, this value will use a minimum of the log file size. A
database can configure both log_size and wait to set an upper bound
for checkpoints; setting this value above 0 configures periodic
checkpoints., an integer between 0 and 2GB; default \c 0.}
@config{ wait, seconds to wait between each
checkpoint; setting this value above 0 configures periodic
checkpoints., an integer between 0 and 100000; default \c 0.}
@config{ ),,}
@config{compatibility = (, set compatibility version of database.
Changing the compatibility version requires that there are no active
operations for the duration of the call., a set of related
configuration options defined below.}
@config{ release, compatibility release
version string., a string; default empty.}
@config{ ),,}
@config{error_prefix, prefix string for error messages., a string;
default empty.}
@config{eviction = (, eviction configuration options., a set of
related configuration options defined below.}
@config{ threads_max, maximum number of
threads WiredTiger will start to help evict pages from cache. The
number of threads started will vary depending on the current eviction
load. Each eviction worker thread uses a session from the configured
session_max., an integer between 1 and 20; default \c 8.}
@config{ threads_min, minimum number of
threads WiredTiger will start to help evict pages from cache. The
number of threads currently running will vary depending on the
current eviction load., an integer between 1 and 20; default \c 1.}
@config{ ),,}
@config{eviction_checkpoint_target, perform eviction at the beginning
of checkpoints to bring the dirty content in cache to this level. It
is a percentage of the cache size if the value is within the range of
0 to 100 or an absolute size when greater than 100. The value is not
allowed to exceed the \c cache_size. Ignored if set to zero or \c
in_memory is \c true., an integer between 0 and 10TB; default \c 5.}
@config{eviction_dirty_target, perform eviction in worker threads
when the cache contains at least this much dirty content. It is a
percentage of the cache size if the value is within the range of 1 to
100 or an absolute size when greater than 100. The value is not
allowed to exceed the \c cache_size., an integer between 1 and 10TB;
default \c 5.}
@config{eviction_dirty_trigger, trigger application threads to
perform eviction when the cache contains at least this much dirty
content. It is a percentage of the cache size if the value is within
the range of 1 to 100 or an absolute size when greater than 100. The
value is not allowed to exceed the \c cache_size. This setting only
alters behavior if it is lower than eviction_trigger., an integer
between 1 and 10TB; default \c 20.}
@config{eviction_target, perform eviction in worker threads when the
cache contains at least this much content. It is a percentage of the
cache size if the value is within the range of 10 to 100 or an
absolute size when greater than 100. The value is not allowed to
exceed the \c cache_size., an integer between 10 and 10TB; default \c
80.}
@config{eviction_trigger, trigger application threads to perform
eviction when the cache contains at least this much content. It is a
percentage of the cache size if the value is within the range of 10
to 100 or an absolute size when greater than 100. The value is not
allowed to exceed the \c cache_size., an integer between 10 and 10TB;
default \c 95.}
@config{file_manager = (, control how file handles are managed., a
set of related configuration options defined below.}
@config{ close_handle_minimum, number of
handles open before the file manager will look for handles to close.,
an integer greater than or equal to 0; default \c 250.}
@config{ close_idle_time, amount of time in
seconds a file handle needs to be idle before attempting to close it.
A setting of 0 means that idle handles are not closed., an integer
between 0 and 100000; default \c 30.}
@config{ close_scan_interval, interval in
seconds at which to check for files that are inactive and close
them., an integer between 1 and 100000; default \c 10.}
@config{ ),,}
@config{log = (, enable logging. Enabling logging uses three
sessions from the configured session_max., a set of related
configuration options defined below.}
@config{ archive, automatically archive
unneeded log files., a boolean flag; default \c true.}
@config{ prealloc, pre-allocate log files., a
boolean flag; default \c true.}
@config{ zero_fill, manually write zeroes into
log files., a boolean flag; default \c false.}
@config{ ),,}
@config{lsm_manager = (, configure database wide options for LSM tree
management. The LSM manager is started automatically the first time
an LSM tree is opened. The LSM manager uses a session from the
configured session_max., a set of related configuration options
defined below.}
@config{ merge, merge LSM
chunks where possible., a boolean flag; default \c true.}
@config{ worker_thread_max, Configure a set of
threads to manage merging LSM trees in the database. Each worker
thread uses a session handle from the configured session_max., an
integer between 3 and 20; default \c 4.}
@config{ ),,}
@config{operation_tracking = (, enable tracking of
performance-critical functions. See @ref operation_tracking for more
information., a set of related configuration options defined below.}
@config{ enabled, enable operation tracking
subsystem., a boolean flag; default \c false.}
@config{ path, the name of a directory into
which operation tracking files are written. The directory must
already exist. If the value is not an absolute path, the path is
relative to the database home (see @ref absolute_path for more
information)., a string; default \c “.”.}
@config{ ),,}
@config{shared_cache = (, shared cache configuration options. A
database should configure either a cache_size or a shared_cache not
both. Enabling a shared cache uses a session from the configured
session_max. A shared cache can not have absolute values configured
for cache eviction settings., a set of related configuration options
defined below.}
@config{ chunk, the
granularity that a shared cache is redistributed., an integer between
1MB and 10TB; default \c 10MB.}
@config{ name,
the name of a cache that is shared between databases or \c “none”
when no shared cache is configured., a string; default \c none.}
@config{ quota, maximum size of cache this
database can be allocated from the shared cache. Defaults to the
entire shared cache size., an integer; default \c 0.}
@config{ reserve, amount of cache this
database is guaranteed to have available from the shared cache. This
setting is per database. Defaults to the chunk size., an integer;
default \c 0.}
@config{ size, maximum memory
to allocate for the shared cache. Setting this will update the value
if one is already set., an integer between 1MB and 10TB; default \c
500MB.}
@config{ ),,}
@config{statistics, Maintain database statistics, which may impact
performance. Choosing “all” maintains all statistics regardless of
cost, “fast” maintains a subset of statistics that are relatively
inexpensive, “none” turns off all statistics. The “clear”
configuration resets statistics after they are gathered, where
appropriate (for example, a cache size statistic is not cleared,
while the count of cursor insert operations will be cleared). When
“clear” is configured for the database, gathered statistics are
reset each time a statistics cursor is used to gather statistics, as
well as each time statistics are logged using the \c statistics_log
configuration. See @ref statistics for more information., a list,
with values chosen from the following options: \c “all”, \c
“cache_walk”, \c “fast”, \c “none”, \c “clear”, \c “tree_walk”;
default \c none.}
@config{statistics_log = (, log any statistics the database is
configured to maintain, to a file. See @ref statistics for more
information. Enabling the statistics log server uses a session from
the configured session_max., a set of related configuration options
defined below.}
@config{ json, encode
statistics in JSON format., a boolean flag; default \c false.}
@config{ on_close, log statistics on database
close., a boolean flag; default \c false.}
@config{ sources, if non-empty, include
statistics for the list of data source URIs, if they are open at the
time of the statistics logging. The list may include URIs matching a
single data source (“table:mytable”), or a URI matching all data
sources of a particular type (“table:”)., a list of strings; default
empty.}
@config{ timestamp, a timestamp
prepended to each log record, may contain strftime conversion
specifications, when \c json is configured, defaults to \c
“%FT%Y.000Z”., a string; default \c “%b %d %H:%M:%S”.}
@config{ wait, seconds to wait between each
write of the log records; setting this value above 0 configures
statistics logging., an integer between 0 and 100000; default \c 0.}
@config{ ),,}
@config{verbose, enable messages for various events. Options are
given as a list, such as
“verbose=[evictserver,read]”., a list, with values
chosen from the following options: \c “api”, \c “block”, \c
“checkpoint”, \c “checkpoint_progress”, \c “compact”, \c “evict”,
\c “evict_stuck”, \c “evictserver”, \c “fileops”, \c “handleops”,
\c “log”, \c “lookaside”, \c “lookaside_activity”, \c “lsm”, \c
“lsm_manager”, \c “metadata”, \c “mutex”, \c “overflow”, \c
“read”, \c “rebalance”, \c “reconcile”, \c “recovery”, \c
“recovery_progress”, \c “salvage”, \c “shared_cache”, \c “split”,
\c “temporary”, \c “thread_group”, \c “timestamp”, \c
“transaction”, \c “verify”, \c “version”, \c “write”; default
empty.}
@configend
@errors
get_home: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION) -> *const c_char>The home directory of the connection.
@snippet ex_all.c Get the database home directory
@param connection the connection handle @returns a pointer to a string naming the home directory
configure_method: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, method: *const c_char, uri: *const c_char, config: *const c_char, type_: *const c_char, check: *const c_char) -> c_int>Add configuration options for a method. See @ref custom_ds_config_add for more information.
@snippet ex_all.c Configure method configuration
@param connection the connection handle @param method the method being configured @param uri the object type or NULL for all object types @param config the additional configuration’s name and default value @param type the additional configuration’s type (must be one of \c “boolean”, \c “int”, \c “list” or \c “string”) @param check the additional configuration check string, or NULL if none @errors
is_new: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION) -> c_int>Return if opening this handle created the database.
@snippet ex_all.c Check if the database is newly created
@param connection the connection handle @returns false (zero) if the connection existed before the call to ::wiredtiger_open, true (non-zero) if it was created by opening this handle.
open_session: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, event_handler: *mut WT_EVENT_HANDLER, config: *const c_char, sessionp: *mut *mut WT_SESSION) -> c_int>@name Session handles @{ / /*! Open a session.
@snippet ex_all.c Open a session
@param connection the connection handle
@param event_handler An event handler. If NULL, the
connection’s event handler is used. See @ref event_message_handling
for more information.
@configstart{WT_CONNECTION.open_session, see dist/api_data.py}
@config{cache_cursors, enable caching of cursors for reuse. Any
calls to WT_CURSOR::close for a cursor created in this session will
mark the cursor as cached and keep it available to be reused for
later calls to WT_SESSION::open_cursor. Cached cursors may be
eventually closed. This value is inherited from ::wiredtiger_open \c
cache_cursors., a boolean flag; default \c true.}
@config{ignore_cache_size, when set, operations performed by this
session ignore the cache size and are not blocked when the cache is
full. Note that use of this option for operations that create cache
pressure can starve ordinary sessions that obey the cache size., a
boolean flag; default \c false.}
@config{isolation, the default isolation level for operations in this
session., a string, chosen from the following options: \c
“read-uncommitted”, \c “read-committed”, \c “snapshot”; default \c
read-committed.}
@configend
@param[out] sessionp the new session handle
@errors
query_timestamp: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, hex_timestamp: *mut c_char, config: *const c_char) -> c_int>@name Transactions @{ / /*! Query the global transaction timestamp state.
@snippet ex_all.c query timestamp
@param connection the connection handle @param[out] hex_timestamp a buffer that will be set to the hexadecimal encoding of the timestamp being queried. Must be large enough to hold a hex-encoded timestamp (i.e., double the timestamp size plus one byte for NUL termination). @configstart{WT_CONNECTION.query_timestamp, see dist/api_data.py} @config{get, specify which timestamp to query: \c all_committed returns the largest timestamp such that all timestamps up to that value have committed, \c oldest returns the most recent \c oldest_timestamp set with WT_CONNECTION::set_timestamp, \c pinned returns the minimum of the \c oldest_timestamp and the read timestamps of all active readers, and \c stable returns the most recent \c stable_timestamp set with WT_CONNECTION::set_timestamp. See @ref transaction_timestamps., a string, chosen from the following options: \c “all_committed”, \c “last_checkpoint”, \c “oldest”, \c “pinned”, \c “recovery”, \c “stable”; default \c all_committed.} @configend @errors If there is no matching timestamp (e.g., if this method is called before timestamps are used) ::WT_NOTFOUND will be returned.
set_timestamp: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, config: *const c_char) -> c_int>Set a global transaction timestamp.
@snippet ex_all.c set commit timestamp
@snippet ex_all.c set oldest timestamp
@snippet ex_all.c set stable timestamp
@param connection the connection handle @configstart{WT_CONNECTION.set_timestamp, see dist/api_data.py} @config{commit_timestamp, reset the maximum commit timestamp tracked by WiredTiger. This will cause future calls to WT_CONNECTION::query_timestamp to ignore commit timestamps greater than the specified value until the next commit moves the tracked commit timestamp forwards. This is only intended for use where the application is rolling back locally committed transactions. The supplied value must not be older than the current oldest and stable timestamps. See @ref transaction_timestamps., a string; default empty.} @config{force, set timestamps even if they violate normal ordering requirements. For example allow the \c oldest_timestamp to move backwards., a boolean flag; default \c false.} @config{oldest_timestamp, future commits and queries will be no earlier than the specified timestamp. Supplied values must be monotonically increasing, any attempt to set the value to older than the current is silently ignored. The supplied value must not be newer than the current stable timestamp. See @ref transaction_timestamps., a string; default empty.} @config{stable_timestamp, checkpoints will not include commits that are newer than the specified timestamp in tables configured with \c log=(enabled=false). Supplied values must be monotonically increasing, any attempt to set the value to older than the current is silently ignored. The supplied value must not be older than the current oldest timestamp. See @ref transaction_timestamps., a string; default empty.} @configend @errors
rollback_to_stable: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, config: *const c_char) -> c_int>Rollback in-memory non-logged state to an earlier point in time.
This method uses a timestamp to define the rollback point, and thus requires that the application uses timestamps and that the stable_timestamp must have been set via a call to WT_CONNECTION::set_timestamp. Any updates to checkpoint durable tables that are more recent than the stable timestamp are removed.
This method requires that there are no active operations for the duration of the call.
Any updates made to logged tables will not be rolled back. Any updates made without an associated timestamp will not be rolled back. See @ref transaction_timestamps.
@snippet ex_all.c rollback to stable
@param connection the connection handle @configempty{WT_CONNECTION.rollback_to_stable, see dist/api_data.py} @errors
load_extension: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, path: *const c_char, config: *const c_char) -> c_int>@name Extensions @{ / /*! Load an extension.
@snippet ex_all.c Load an extension
@param connection the connection handle @param path the filename of the extension module, or \c “local” to search the current application binary for the initialization function, see @ref extensions for more details. @configstart{WT_CONNECTION.load_extension, see dist/api_data.py} @config{config, configuration string passed to the entry point of the extension as its WT_CONFIG_ARG argument., a string; default empty.} @config{early_load, whether this extension should be loaded at the beginning of ::wiredtiger_open. Only applicable to extensions loaded via the wiredtiger_open configurations string., a boolean flag; default \c false.} @config{entry, the entry point of the extension, called to initialize the extension when it is loaded. The signature of the function must match ::wiredtiger_extension_init., a string; default \c wiredtiger_extension_init.} @config{terminate, an optional function in the extension that is called before the extension is unloaded during WT_CONNECTION::close. The signature of the function must match ::wiredtiger_extension_terminate., a string; default \c wiredtiger_extension_terminate.} @configend @errors
add_data_source: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, prefix: *const c_char, data_source: *mut WT_DATA_SOURCE, config: *const c_char) -> c_int>Add a custom data source. See @ref custom_data_sources for more information.
The application must first implement the WT_DATA_SOURCE interface and then register the implementation with WiredTiger:
@snippet ex_data_source.c WT_DATA_SOURCE register
@param connection the connection handle @param prefix the URI prefix for this data source, e.g., “file:” @param data_source the application-supplied implementation of WT_DATA_SOURCE to manage this data source. @configempty{WT_CONNECTION.add_data_source, see dist/api_data.py} @errors
add_collator: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, name: *const c_char, collator: *mut WT_COLLATOR, config: *const c_char) -> c_int>Add a custom collation function.
The application must first implement the WT_COLLATOR interface and then register the implementation with WiredTiger:
@snippet ex_all.c WT_COLLATOR register
@param connection the connection handle @param name the name of the collation to be used in calls to WT_SESSION::create, may not be \c “none” @param collator the application-supplied collation handler @configempty{WT_CONNECTION.add_collator, see dist/api_data.py} @errors
add_compressor: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, name: *const c_char, compressor: *mut WT_COMPRESSOR, config: *const c_char) -> c_int>Add a compression function.
The application must first implement the WT_COMPRESSOR interface and then register the implementation with WiredTiger:
@snippet nop_compress.c WT_COMPRESSOR initialization structure
@snippet nop_compress.c WT_COMPRESSOR initialization function
@param connection the connection handle @param name the name of the compression function to be used in calls to WT_SESSION::create, may not be \c “none” @param compressor the application-supplied compression handler @configempty{WT_CONNECTION.add_compressor, see dist/api_data.py} @errors
add_encryptor: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, name: *const c_char, encryptor: *mut WT_ENCRYPTOR, config: *const c_char) -> c_int>Add an encryption function.
The application must first implement the WT_ENCRYPTOR interface and then register the implementation with WiredTiger:
@snippet nop_encrypt.c WT_ENCRYPTOR initialization structure
@snippet nop_encrypt.c WT_ENCRYPTOR initialization function
@param connection the connection handle @param name the name of the encryption function to be used in calls to WT_SESSION::create, may not be \c “none” @param encryptor the application-supplied encryption handler @configempty{WT_CONNECTION.add_encryptor, see dist/api_data.py} @errors
add_extractor: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, name: *const c_char, extractor: *mut WT_EXTRACTOR, config: *const c_char) -> c_int>Add a custom extractor for index keys or column groups.
The application must first implement the WT_EXTRACTOR interface and then register the implementation with WiredTiger:
@snippet ex_all.c WT_EXTRACTOR register
@param connection the connection handle @param name the name of the extractor to be used in calls to WT_SESSION::create, may not be \c “none” @param extractor the application-supplied extractor @configempty{WT_CONNECTION.add_extractor, see dist/api_data.py} @errors
set_file_system: Option<unsafe extern "C" fn(connection: *mut WT_CONNECTION, fs: *mut WT_FILE_SYSTEM, config: *const c_char) -> c_int>Configure a custom file system.
This method can only be called from an early loaded extension module. The application must first implement the WT_FILE_SYSTEM interface and then register the implementation with WiredTiger:
@snippet ex_file_system.c WT_FILE_SYSTEM register
@param connection the connection handle @param fs the populated file system structure @configempty{WT_CONNECTION.set_file_system, see dist/api_data.py} @errors
get_extension_api: Option<unsafe extern "C" fn(wt_conn: *mut WT_CONNECTION) -> *mut WT_EXTENSION_API>Return a reference to the WiredTiger extension functions.
@snippet ex_data_source.c WT_EXTENSION_API declaration
@param wt_conn the WT_CONNECTION handle @returns a reference to a WT_EXTENSION_API structure.
Trait Implementations§
Source§impl Clone for __wt_connection
impl Clone for __wt_connection
Source§fn clone(&self) -> __wt_connection
fn clone(&self) -> __wt_connection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more