Python wrapper around C WT_CONNECTION.
More...
Python wrapper around C WT_CONNECTION.
def wiredtiger.Connection.close |
( |
|
self, |
|
|
|
args |
|
) |
| |
close(self, config) -> int
Close a connection. Any open sessions will be closed.
ret = conn->
close(conn, NULL);
- Parameters
-
connection | the connection handle |
config | Configuration string, see Configuration Strings. No values currently permitted. |
- Returns
- zero on success and a non-zero error code on failure. See Error Returns for details.
def wiredtiger.Connection.get_home |
( |
|
self, |
|
|
|
args |
|
) |
| |
get_home(self) -> string
The home directory of the connection.
printf(
"The database home is %s\n", conn->
get_home(conn));
- Parameters
-
connection | the connection handle |
- Returns
- a pointer to a string naming the home directory
def wiredtiger.Connection.is_new |
( |
|
self, |
|
|
|
args |
|
) |
| |
is_new(self) -> int
Return if opening this handle created the database.
- Parameters
-
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.
def wiredtiger.Connection.load_extension |
( |
|
self, |
|
|
|
args |
|
) |
| |
load_extension(self, path, config) -> int
Load an extension.
- Parameters
-
connection | the connection handle |
path | the filename of the extension module |
config | Configuration string, see Configuration Strings. Permitted values:
Name | Effect | Values |
entry | the entry point of the extension. | a string; default wiredtiger_extension_init . |
prefix | a prefix for all names registered by this extension (e.g., to make namespaces distinct or during upgrades. | a string; default empty. |
|
- Returns
- zero on success and a non-zero error code on failure. See Error Returns for details.
def wiredtiger.Connection.open_session |
( |
|
self, |
|
|
|
args |
|
) |
| |
open_session(self, config) -> int
Open a session.
- Parameters
-
connection | the connection handle |
errhandler | An error handler. If NULL , the connection's error handler is used |
config | Configuration string, see Configuration Strings. Permitted values:
Name | Effect | Values |
isolation | the default isolation level for operations in this session. | a string, chosen from the following options: "read-uncommitted" , "read-committed" , "snapshot" ; default read-committed . |
|
sessionp | the new session handle |
- Returns
- zero on success and a non-zero error code on failure. See Error Returns for details.
def wiredtiger.Connection.reconfigure |
( |
|
self, |
|
|
|
args |
|
) |
| |
reconfigure(self, config) -> int
Reconfigure a connection handle.
- Parameters
-
connection | the connection handle |
config | Configuration string, see Configuration Strings. Permitted values:
Name | Effect | Values |
cache_size | maximum heap memory to allocate for the cache. | an integer between 1MB and 10TB; default 100MB . |
error_prefix | prefix string for error messages. | a string; default empty. |
eviction_target | continue evicting until the cache becomes less full than this (as a percentage). Must be less than eviction_trigger . | an integer between 10 and 99; default 80 . |
eviction_trigger | trigger eviction when the cache becomes this full (as a percentage). | an integer between 10 and 99; default 95 . |
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: "block" , "ckpt" , "evict" , "evictserver" , "fileops" , "hazard" , "lsm" , "mutex" , "read" , "readserver" , "reconcile" , "salvage" , "verify" , "write" ; default empty. |
|
- Returns
- zero on success and a non-zero error code on failure. See Error Returns for details.