 |
Version 10.0.2
|
Table of WiredTiger extension methods.
More...
|
int(* | err_printf )(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *fmt,...) |
| Insert an error message into the WiredTiger error stream. More...
|
|
int(* | msg_printf )(WT_EXTENSION_API *, WT_SESSION *session, const char *fmt,...) |
| Insert a message into the WiredTiger message stream. More...
|
|
const char *(* | strerror )(WT_EXTENSION_API *, WT_SESSION *session, int error) |
| Return information about an error as a string. More...
|
|
int(* | map_windows_error )(WT_EXTENSION_API *wt_api, WT_SESSION *session, uint32_t windows_error) |
| Map a Windows system error code to a POSIX 1003.1/ANSI C error. More...
|
|
void *(* | scr_alloc )(WT_EXTENSION_API *wt_api, WT_SESSION *session, size_t bytes) |
| Allocate short-term use scratch memory. More...
|
|
void(* | scr_free )(WT_EXTENSION_API *, WT_SESSION *session, void *ref) |
| Free short-term use scratch memory. More...
|
|
int(* | collator_config )(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *uri, WT_CONFIG_ARG *config, WT_COLLATOR **collatorp, int *ownp) |
| Configure the extension collator method. More...
|
|
int(* | collate )(WT_EXTENSION_API *wt_api, WT_SESSION *session, WT_COLLATOR *collator, WT_ITEM *first, WT_ITEM *second, int *cmp) |
| The extension collator method. More...
|
|
int(* | config_get )(WT_EXTENSION_API *wt_api, WT_SESSION *session, WT_CONFIG_ARG *config, const char *key, WT_CONFIG_ITEM *value) |
| Return the value of a configuration key. More...
|
|
int(* | config_get_string )(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *config, const char *key, WT_CONFIG_ITEM *value) |
| Return the value of a configuration key from a string. More...
|
|
int(* | config_parser_open )(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *config, size_t len, WT_CONFIG_PARSER **config_parserp) |
| Create a handle that can be used to parse or create configuration strings compatible with WiredTiger APIs. More...
|
|
int(* | config_parser_open_arg )(WT_EXTENSION_API *wt_api, WT_SESSION *session, WT_CONFIG_ARG *config, WT_CONFIG_PARSER **config_parserp) |
| Create a handle that can be used to parse or create configuration strings compatible with WiredTiger APIs. More...
|
|
int(* | file_system_get )(WT_EXTENSION_API *wt_api, WT_SESSION *session, WT_FILE_SYSTEM **file_system) |
| Get the file system abstraction used by WiredTiger. More...
|
|
int(* | metadata_insert )(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *key, const char *value) |
| Insert a row into the metadata if it does not already exist. More...
|
|
int(* | metadata_remove )(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *key) |
| Remove a row from the metadata. More...
|
|
int(* | metadata_search )(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *key, char **valuep) |
| Return a row from the metadata. More...
|
|
int(* | metadata_update )(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *key, const char *value) |
| Update a row in the metadata by either inserting a new record or updating an existing record. More...
|
|
int(* | struct_pack )(WT_EXTENSION_API *wt_api, WT_SESSION *session, void *buffer, size_t size, const char *format,...) |
| Pack a structure into a buffer. More...
|
|
int(* | struct_size )(WT_EXTENSION_API *wt_api, WT_SESSION *session, size_t *sizep, const char *format,...) |
| Calculate the size required to pack a structure. More...
|
|
int(* | struct_unpack )(WT_EXTENSION_API *wt_api, WT_SESSION *session, const void *buffer, size_t size, const char *format,...) |
| Unpack a structure from a buffer. More...
|
|
int(* | pack_start )(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *format, void *buffer, size_t size, WT_PACK_STREAM **psp) |
| Start a packing operation into a buffer. More...
|
|
int(* | unpack_start )(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *format, const void *buffer, size_t size, WT_PACK_STREAM **psp) |
| Start an unpacking operation from a buffer. More...
|
|
int(* | pack_close )(WT_EXTENSION_API *wt_api, WT_PACK_STREAM *ps, size_t *usedp) |
| Close a packing stream. More...
|
|
int(* | pack_item )(WT_EXTENSION_API *wt_api, WT_PACK_STREAM *ps, WT_ITEM *item) |
| Pack an item into a packing stream. More...
|
|
int(* | pack_int )(WT_EXTENSION_API *wt_api, WT_PACK_STREAM *ps, int64_t i) |
| Pack a signed integer into a packing stream. More...
|
|
int(* | pack_str )(WT_EXTENSION_API *wt_api, WT_PACK_STREAM *ps, const char *s) |
| Pack a string into a packing stream. More...
|
|
int(* | pack_uint )(WT_EXTENSION_API *wt_api, WT_PACK_STREAM *ps, uint64_t u) |
| Pack an unsigned integer into a packing stream. More...
|
|
int(* | unpack_item )(WT_EXTENSION_API *wt_api, WT_PACK_STREAM *ps, WT_ITEM *item) |
| Unpack an item from a packing stream. More...
|
|
int(* | unpack_int )(WT_EXTENSION_API *wt_api, WT_PACK_STREAM *ps, int64_t *ip) |
| Unpack a signed integer from a packing stream. More...
|
|
int(* | unpack_str )(WT_EXTENSION_API *wt_api, WT_PACK_STREAM *ps, const char **sp) |
| Unpack a string from a packing stream. More...
|
|
int(* | unpack_uint )(WT_EXTENSION_API *wt_api, WT_PACK_STREAM *ps, uint64_t *up) |
| Unpack an unsigned integer from a packing stream. More...
|
|
uint64_t(* | transaction_id )(WT_EXTENSION_API *wt_api, WT_SESSION *session) |
| Return the current transaction ID. More...
|
|
int(* | transaction_isolation_level )(WT_EXTENSION_API *wt_api, WT_SESSION *session) |
| Return the current transaction's isolation level; returns one of WT_TXN_ISO_READ_COMMITTED, WT_TXN_ISO_READ_UNCOMMITTED, or WT_TXN_ISO_SNAPSHOT. More...
|
|
int(* | transaction_notify )(WT_EXTENSION_API *wt_api, WT_SESSION *session, WT_TXN_NOTIFY *notify) |
| Request notification of transaction resolution by specifying a function to be called when the session's current transaction is either committed or rolled back. More...
|
|
uint64_t(* | transaction_oldest )(WT_EXTENSION_API *wt_api) |
| Return the oldest transaction ID not yet visible to a running transaction. More...
|
|
int(* | transaction_visible )(WT_EXTENSION_API *wt_api, WT_SESSION *session, uint64_t transaction_id) |
| Return if the current transaction can see the given transaction ID. More...
|
|
const char *(* | version )(int *majorp, int *minorp, int *patchp) |
| Get version information. More...
|
|
int(* | spin_init )(WT_EXTENSION_API *wt_api, WT_EXTENSION_SPINLOCK *spinlock, const char *name) |
| Initialize a spinlock. More...
|
|
void(* | spin_destroy )(WT_EXTENSION_API *wt_api, WT_EXTENSION_SPINLOCK *spinlock) |
| Destroy a spinlock. More...
|
|
void(* | spin_lock )(WT_EXTENSION_API *wt_api, WT_SESSION *session, WT_EXTENSION_SPINLOCK *spinlock) |
| Spin until the lock is acquired. More...
|
|
void(* | spin_unlock )(WT_EXTENSION_API *wt_api, WT_SESSION *session, WT_EXTENSION_SPINLOCK *spinlock) |
| Release the spinlock. More...
|
|
Table of WiredTiger extension methods.
This structure is used to provide a set of WiredTiger methods to extension modules without needing to link the modules with the WiredTiger library.
The extension methods may be used both by modules that are linked with the WiredTiger library (for example, a data source configured using the WT_CONNECTION::add_data_source method), and by modules not linked with the WiredTiger library (for example, a compression module configured using the WT_CONNECTION::add_compressor method).
To use these functions:
#include <wiredtiger_ext.h>
static void
{
}
The following code is from the sample compression module, where compression extension functions are configured in the extension's entry point:
typedef struct {
unsigned long nop_calls;
} NOP_COMPRESSOR;
int
{
NOP_COMPRESSOR *nop_compressor;
int ret;
(void)config;
if ((nop_compressor = calloc(1, sizeof(NOP_COMPRESSOR))) == NULL)
return (errno);
nop_compressor->compressor.
compress = nop_compress;
nop_compressor->compressor.decompress = nop_decompress;
nop_compressor->compressor.pre_size = nop_pre_size;
nop_compressor->compressor.terminate = nop_terminate;
return (0);
free(nop_compressor);
return (ret);
}
- Examples
- ex_encrypt.c, ex_file_system.c, nop_encrypt.c, rotn_encrypt.c, and sodium_encrypt.c.
◆ collate
The extension collator method.
- Parameters
-
| wt_api | the extension handle |
| session | the session handle (or NULL if none available) |
| collator | the collator (or NULL if none available) |
| first | first item |
| second | second item |
[out] | cmp | set less than 0 if first collates less than second , set equal to 0 if first collates equally to second , set greater than 0 if first collates greater than second |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
int cmp;
error_check(wt_api->
collate(wt_api, session, collator, &first, &second, &cmp));
if (cmp == 0)
printf("key1 collates identically to key2\n");
else if (cmp < 0)
printf("key1 collates less than key2\n");
else
printf("key1 collates greater than key2\n");
◆ collator_config
Configure the extension collator method.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
uri | the URI of the handle being configured |
config | the configuration information passed to an application |
collatorp | the selector collator, if any |
ownp | set if the collator terminate method should be called when no longer needed |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
int collator_owned;
wt_api, session, "dsrc:", config, &collator, &collator_owned));
◆ config_get
Return the value of a configuration key.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
config | the configuration information passed to an application |
key | configuration key string |
value | the returned value |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
const char *my_data_source_key;
error_check(wt_api->
config_get(wt_api, session, config,
"key_format", &v));
if (v.
len == 1 && v.
str[0] ==
'r')
my_data_source_key = "recno";
else
my_data_source_key = "bytestring";
- Examples
- ex_encrypt.c, nop_encrypt.c, rotn_encrypt.c, and sodium_encrypt.c.
◆ config_get_string
Return the value of a configuration key from a string.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
config | the configuration string |
key | configuration key string |
value | the returned value |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
const char *my_data_source_key;
error_check(wt_api->
config_get(wt_api, session, config,
"key_format", &v));
if (v.
len == 1 && v.
str[0] ==
'r')
my_data_source_key = "recno";
else
my_data_source_key = "bytestring";
◆ config_parser_open
Create a handle that can be used to parse or create configuration strings compatible with WiredTiger APIs.
This API is outside the scope of a WiredTiger connection handle, since applications may need to generate configuration strings prior to calling wiredtiger_open.
- Parameters
-
| session | the session handle to be used for error reporting (if NULL, error messages will be written to stderr). |
| config | the configuration string being parsed. The string must remain valid for the lifetime of the parser handle. |
| len | the number of valid bytes in config |
[out] | config_parserp | A pointer to the newly opened handle |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
const char *config_string =
"path=/dev/loop,page_size=1024,log=(archive=true,file_max=20MB)";
error_check(
error_check(parser->
close(parser));
◆ config_parser_open_arg
Create a handle that can be used to parse or create configuration strings compatible with WiredTiger APIs.
This API is outside the scope of a WiredTiger connection handle, since applications may need to generate configuration strings prior to calling wiredtiger_open.
- Parameters
-
| session | the session handle to be used for error reporting (if NULL, error messages will be written to stderr). |
| config | the configuration string being parsed. The string must remain valid for the lifetime of the parser handle. |
| len | the number of valid bytes in config |
[out] | config_parserp | A pointer to the newly opened handle |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
const char *config_string =
"path=/dev/loop,page_size=1024,log=(archive=true,file_max=20MB)";
error_check(
error_check(parser->
close(parser));
- Examples
- ex_file_system.c.
◆ err_printf
Insert an error message into the WiredTiger error stream.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
fmt | a printf-like format specification |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
(void)wt_api->
err_printf(wt_api, session,
"extension error message: %s", msg);
- Examples
- ex_file_system.c, nop_encrypt.c, rotn_encrypt.c, and sodium_encrypt.c.
◆ file_system_get
Get the file system abstraction used by WiredTiger.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
file_system | the returned file system handle. |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details. If called from an extension's initialization routine, this may return WT_NOTFOUND if the file system has not yet been established.
const char *key = "datasource_uri";
const char *value = "data source uri's record";
◆ map_windows_error
Map a Windows system error code to a POSIX 1003.1/ANSI C error.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
windows_error | a Windows system error code |
- Returns
- a string representation of the error
◆ metadata_insert
Insert a row into the metadata if it does not already exist.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
key | row key |
value | row value |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
const char *key = "datasource_uri";
const char *value = "data source uri's record";
◆ metadata_remove
Remove a row from the metadata.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
key | row key |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
const char *key = "datasource_uri";
◆ metadata_search
Return a row from the metadata.
- Parameters
-
| wt_api | the extension handle |
| session | the session handle (or NULL if none available) |
| key | row key |
[out] | valuep | the row value |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
const char *key = "datasource_uri";
char *value;
printf("metadata: %s has a value of %s\n", key, value);
◆ metadata_update
Update a row in the metadata by either inserting a new record or updating an existing record.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
key | row key |
value | row value |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
const char *key = "datasource_uri";
const char *value = "data source uri's record";
◆ msg_printf
Insert a message into the WiredTiger message stream.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
fmt | a printf-like format specification |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
(void)wt_api->
msg_printf(wt_api, session,
"extension message: %s", msg);
◆ pack_close
Close a packing stream.
- Parameters
-
| ps | the packing stream handle |
[out] | usedp | the number of bytes in the buffer used by the stream |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ pack_int
Pack a signed integer into a packing stream.
- Parameters
-
ps | the packing stream handle |
i | a signed integer to pack |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ pack_item
Pack an item into a packing stream.
- Parameters
-
ps | the packing stream handle |
item | an item to pack |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ pack_start
Start a packing operation into a buffer.
See wiredtiger_pack_start for details.
- Parameters
-
| session | the session handle |
| format | the data format, see Packing and Unpacking Data |
| buffer | a pointer to memory to hold the packed data |
| size | the size of the buffer |
[out] | psp | the new packing stream handle |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ pack_str
Pack a string into a packing stream.
- Parameters
-
ps | the packing stream handle |
s | a string to pack |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ pack_uint
Pack an unsigned integer into a packing stream.
- Parameters
-
ps | the packing stream handle |
u | an unsigned integer to pack |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ scr_alloc
Allocate short-term use scratch memory.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
bytes | the number of bytes of memory needed |
- Returns
- A valid memory reference on success or NULL on error
void *buffer;
if ((buffer = wt_api->
scr_alloc(wt_api, session, 512)) == NULL) {
wt_api, session,
"buffer allocation: %s", session->
strerror(session, ENOMEM));
return (ENOMEM);
}
◆ scr_free
Free short-term use scratch memory.
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
ref | a memory reference returned by WT_EXTENSION_API::scr_alloc |
wt_api->
scr_free(wt_api, session, buffer);
◆ spin_destroy
void(* WT_EXTENSION_API::spin_destroy) (WT_EXTENSION_API *wt_api, WT_EXTENSION_SPINLOCK *spinlock) |
Destroy a spinlock.
- Parameters
-
wt_api | the extension handle |
session | the session handle |
spinlock | the extension spinlock |
◆ spin_init
int(* WT_EXTENSION_API::spin_init) (WT_EXTENSION_API *wt_api, WT_EXTENSION_SPINLOCK *spinlock, const char *name) |
Initialize a spinlock.
- Parameters
-
wt_api | the extension handle |
session | the session handle |
spinlock | the extension spinlock |
name | the name for the spinlock |
◆ spin_lock
Spin until the lock is acquired.
- Parameters
-
wt_api | the extension handle |
session | the session handle |
spinlock | the extension spinlock |
◆ spin_unlock
Release the spinlock.
- Parameters
-
wt_api | the extension handle |
session | the session handle |
spinlock | the extension spinlock |
◆ strerror
Return information about an error as a string.
wt_api, session,
"WiredTiger error return: %s", wt_api->
strerror(wt_api, session, ret));
- Parameters
-
wt_api | the extension handle |
session | the session handle (or NULL if none available) |
error | a return value from a WiredTiger function |
- Returns
- a string representation of the error
- Examples
- ex_file_system.c, nop_encrypt.c, rotn_encrypt.c, and sodium_encrypt.c.
◆ struct_pack
int(* WT_EXTENSION_API::struct_pack) (WT_EXTENSION_API *wt_api, WT_SESSION *session, void *buffer, size_t size, const char *format,...) |
Pack a structure into a buffer.
Deprecated in favor of stream based pack and unpack API. See WT_EXTENSION_API::pack_start for details.
- Parameters
-
wt_api | the extension handle |
session | the session handle |
buffer | a pointer to a packed byte array |
size | the number of valid bytes in the buffer |
format | the data format, see Packing and Unpacking Data |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ struct_size
Calculate the size required to pack a structure.
Deprecated in favor of stream based pack and unpack API.
- Parameters
-
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ struct_unpack
int(* WT_EXTENSION_API::struct_unpack) (WT_EXTENSION_API *wt_api, WT_SESSION *session, const void *buffer, size_t size, const char *format,...) |
Unpack a structure from a buffer.
Deprecated in favor of stream based pack and unpack API. See WT_EXTENSION_API::unpack_start for details.
- Parameters
-
wt_api | the extension handle |
session | the session handle |
buffer | a pointer to a packed byte array |
size | the number of valid bytes in the buffer |
format | the data format, see Packing and Unpacking Data |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ transaction_id
Return the current transaction ID.
- Parameters
-
wt_api | the extension handle |
session | the session handle |
- Returns
- the current transaction ID.
◆ transaction_isolation_level
◆ transaction_notify
Request notification of transaction resolution by specifying a function to be called when the session's current transaction is either committed or rolled back.
If the transaction is being committed, but the notification function returns an error, the transaction will be rolled back.
- Parameters
-
wt_api | the extension handle |
session | the session handle |
notify | a handler for commit or rollback events |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
handler.
notify = data_source_notify;
◆ transaction_oldest
Return the oldest transaction ID not yet visible to a running transaction.
- Parameters
-
wt_api | the extension handle |
session | the session handle |
- Returns
- the oldest transaction ID not yet visible to a running transaction.
◆ transaction_visible
Return if the current transaction can see the given transaction ID.
- Parameters
-
wt_api | the extension handle |
session | the session handle |
transaction_id | the transaction ID |
- Returns
- true (non-zero) if the transaction ID is visible to the current transaction.
◆ unpack_int
Unpack a signed integer from a packing stream.
- Parameters
-
| ps | the packing stream handle |
[out] | ip | the unpacked signed integer |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ unpack_item
Unpack an item from a packing stream.
- Parameters
-
ps | the packing stream handle |
item | an item to unpack |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ unpack_start
Start an unpacking operation from a buffer.
See wiredtiger_unpack_start for details.
- Parameters
-
| session | the session handle |
| format | the data format, see Packing and Unpacking Data |
| buffer | a pointer to memory holding the packed data |
| size | the size of the buffer |
[out] | psp | the new packing stream handle |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ unpack_str
Unpack a string from a packing stream.
- Parameters
-
| ps | the packing stream handle |
[out] | sp | the unpacked string |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ unpack_uint
Unpack an unsigned integer from a packing stream.
- Parameters
-
| ps | the packing stream handle |
[out] | up | the unpacked unsigned integer |
- Returns
- zero on success and a non-zero error code on failure. See Error handling for details.
◆ version
const char*(* WT_EXTENSION_API::version) (int *majorp, int *minorp, int *patchp) |
Get version information.
int major_v, minor_v, patch;
printf("WiredTiger version is %d, %d (patch %d)\n", major_v, minor_v, patch);
- Parameters
-
majorp | a location where the major version number is returned |
minorp | a location where the minor version number is returned |
patchp | a location where the patch version number is returned |
- Returns
- a string representation of the version
int(* notify)(WT_TXN_NOTIFY *notify, WT_SESSION *session, uint64_t txnid, int committed)
A method called when the session's current transaction is committed or rolled back.
Definition: wiredtiger_ext.h:57
int(* transaction_notify)(WT_EXTENSION_API *wt_api, WT_SESSION *session, WT_TXN_NOTIFY *notify)
Request notification of transaction resolution by specifying a function to be called when the session...
Definition: wiredtiger_ext.h:515
Table of WiredTiger extension methods.
Definition: wiredtiger_ext.h:94
int(* compress)(WT_COMPRESSOR *compressor, WT_SESSION *session, uint8_t *src, size_t src_len, uint8_t *dst, size_t dst_len, size_t *result_lenp, int *compression_failed)
Callback to compress a chunk of data.
Definition: wiredtiger.in:3993
#define WT_TXN_ISO_SNAPSHOT
Snapshot isolation level, returned by WT_EXTENSION_API::transaction_isolation_level.
Definition: wiredtiger_ext.h:39
uint64_t(* transaction_oldest)(WT_EXTENSION_API *wt_api)
Return the oldest transaction ID not yet visible to a running transaction.
Definition: wiredtiger_ext.h:528
int(* metadata_update)(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *key, const char *value)
Update a row in the metadata by either inserting a new record or updating an existing record.
Definition: wiredtiger_ext.h:317
const void * data
The memory reference of the data item.
Definition: wiredtiger.in:111
void *(* scr_alloc)(WT_EXTENSION_API *wt_api, WT_SESSION *session, size_t bytes)
Allocate short-term use scratch memory.
Definition: wiredtiger_ext.h:160
int(* transaction_visible)(WT_EXTENSION_API *wt_api, WT_SESSION *session, uint64_t transaction_id)
Return if the current transaction can see the given transaction ID.
Definition: wiredtiger_ext.h:541
int(* msg_printf)(WT_EXTENSION_API *, WT_SESSION *session, const char *fmt,...)
Insert a message into the WiredTiger message stream.
Definition: wiredtiger_ext.h:124
size_t size
The number of bytes in the data item.
Definition: wiredtiger.in:120
int(* metadata_remove)(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *key)
Remove a row from the metadata.
Definition: wiredtiger_ext.h:289
The interface implemented by applications to provide custom ordering of records.
Definition: wiredtiger.in:3902
int close(WT_CONFIG_PARSER *config_parser)
Close the configuration scanner releasing any resources.
struct WT_CONFIG_ARG WT_CONFIG_ARG
Definition: wiredtiger.in:3888
WT_EXTENSION_API * get_extension_api(WT_CONNECTION *wt_conn)
Return a reference to the WiredTiger extension functions.
const char * str
The value of a configuration string.
Definition: wiredtiger.in:3544
const char *(* strerror)(WT_EXTENSION_API *, WT_SESSION *session, int error)
Return information about an error as a string.
Definition: wiredtiger_ext.h:136
const char * wiredtiger_version(int *majorp, int *minorp, int *patchp)
Get version information.
A raw item of data to be managed, including a pointer to the data and a length.
Definition: wiredtiger.in:103
A handle that can be used to search and traverse configuration strings compatible with WiredTiger API...
Definition: wiredtiger.in:3660
int(* config_get)(WT_EXTENSION_API *wt_api, WT_SESSION *session, WT_CONFIG_ARG *config, const char *key, WT_CONFIG_ITEM *value)
Return the value of a configuration key.
Definition: wiredtiger_ext.h:220
int wiredtiger_extension_init(WT_CONNECTION *connection, WT_CONFIG_ARG *config)
Entry point to an extension, called when the extension is loaded.
int(* map_windows_error)(WT_EXTENSION_API *wt_api, WT_SESSION *session, uint32_t windows_error)
Map a Windows system error code to a POSIX 1003.1/ANSI C error.
Definition: wiredtiger_ext.h:148
A connection to a WiredTiger database.
Definition: wiredtiger.in:2019
void(* scr_free)(WT_EXTENSION_API *, WT_SESSION *session, void *ref)
Free short-term use scratch memory.
Definition: wiredtiger_ext.h:171
size_t len
The number of bytes in the value referenced by str.
Definition: wiredtiger.in:3547
uint64_t(* transaction_id)(WT_EXTENSION_API *wt_api, WT_SESSION *session)
Return the current transaction ID.
Definition: wiredtiger_ext.h:486
Snapshot isolation level, returned by WT_EXTENSION_API::transaction_isolation_level.
Definition: wiredtiger_ext.h:46
int(* collator_config)(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *uri, WT_CONFIG_ARG *config, WT_COLLATOR **collatorp, int *ownp)
Configure the extension collator method.
Definition: wiredtiger_ext.h:187
int wiredtiger_config_parser_open(WT_SESSION *session, const char *config, size_t len, WT_CONFIG_PARSER **config_parserp)
Create a handle that can be used to parse or create configuration strings compatible with WiredTiger ...
int add_compressor(WT_CONNECTION *connection, const char *name, WT_COMPRESSOR *compressor, const char *config)
Add a compression function.
int(* err_printf)(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *fmt,...)
Insert an error message into the WiredTiger error stream.
Definition: wiredtiger_ext.h:112
The interface implemented by applications to provide custom compression.
Definition: wiredtiger.in:3955
int(* metadata_insert)(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *key, const char *value)
Insert a row into the metadata if it does not already exist.
Definition: wiredtiger_ext.h:276
const char * strerror(WT_SESSION *session, int error)
Return information about an error as a string.
int(* metadata_search)(WT_EXTENSION_API *wt_api, WT_SESSION *session, const char *key, char **valuep)
Return a row from the metadata.
Definition: wiredtiger_ext.h:302
int(* collate)(WT_EXTENSION_API *wt_api, WT_SESSION *session, WT_COLLATOR *collator, WT_ITEM *first, WT_ITEM *second, int *cmp)
The extension collator method.
Definition: wiredtiger_ext.h:205
The configuration information returned by the WiredTiger configuration parsing functions in the WT_EX...
Definition: wiredtiger.in:3533
int(* transaction_isolation_level)(WT_EXTENSION_API *wt_api, WT_SESSION *session)
Return the current transaction's isolation level; returns one of WT_TXN_ISO_READ_COMMITTED,...
Definition: wiredtiger_ext.h:499