Commit Graph

27 Commits

Author SHA1 Message Date
Alex Gorrod
d679e12ce7 Update extension API names from txn_XX to transaction_XX. 2013-06-18 12:30:05 +10:00
Michael Cahill
09e7840292 examples/c/ex_data_source.c:578:6: error: variable 'is_visible' set but not used 2013-06-11 09:28:16 +10:00
Michael Cahill
c6ff974b7f Transaction ID extension methods need a real session handle. 2013-06-11 09:17:11 +10:00
Keith Bostic
10038d5029 minor lint, cleanup the new docs. 2013-06-10 11:48:45 -04:00
Keith Bostic
dfbce70242 Add two next extension functions, one to return a transaction ID,
one to return if a transaction ID is visible to the current transaction.
2013-06-10 11:31:32 -04:00
Keith Bostic
be6742a425 Add some more structure to the data-source cursor-create example. 2013-06-10 09:33:48 -04:00
Keith Bostic
7f64e46c56 Add examples to the WiredTiger extension methods for accessing the
metadata.
2013-06-04 12:56:26 -04:00
Michael Cahill
bee26bb372 Merge branch 'develop' into terminate-method
Conflicts:
	src/conn/conn_api.c
2013-05-09 12:46:08 +10:00
Michael Cahill
6f12dda7ca Simplify quoting in config string examples, now that quotes are not reqired for string values starting with slashes. 2013-05-08 16:29:19 +10:00
Keith Bostic
3b88aa616e Add handle.terminate methods to WT_COLLATOR, WT_COMPRESSOR and
WT_DATA_SOURCE handles, called when the handle is discarded,
intended to allow general cleanup when the database is closed.

Re-work the BDB KVS and Memrata support to handle multiple open
databases, that is, get rid of all of the globals.
2013-05-07 11:50:12 -04:00
Keith Bostic
37bc5c7036 minor cleanup, remove unnecessary documentation chunk. 2013-04-20 11:27:56 -04:00
Keith Bostic
df7b969c3b Add WT_EXTENSION_API::strerror so extensions don't have to load against
the WiredTiger library in order to get to wiredtiger_strerror().
2013-04-20 11:02:00 -04:00
Michael Cahill
e4bfc6a957 Export more of the config parsing machinery to the extension API: we're going to need it at some point.
--HG--
rename : src/config/config.c => src/config/config_ext.c
2013-04-18 22:46:00 +10:00
Michael Cahill
1123a185e7 Use an opaque type for config arguments passed to callbacks, rather than void *. 2013-04-18 16:51:20 +10:00
Keith Bostic
ce9c3de74b Remove WT_EXTENSION_CONFIG, export WT_CONFIG_ITEM instead. 2013-04-17 13:46:43 -04:00
Keith Bostic
2f693d8e20 Replace WT_EXTENSION_CONFIG.argv[] with WT_EXTENSION_API::get_config_next;
that method returns the next entry from the list of items contained in the
last value retrieved from WT_EXTENSION_API::get_config.
2013-04-17 12:59:53 -04:00
Keith Bostic
2a53eeb6bb Rename WT_EXTENSION_API::config to be WT_EXTENSION_API::get_config. 2013-04-17 11:24:44 -04:00
Keith Bostic
08c982ad15 Replace wiredtiger_extension_api() with WT_CONNECTION.get_extension_api.
Pass the wiredtiger_extension_init function a (WT_CONNECTION *) instead
of a (WT_SESSION *, WT_EXTENSION_API) pair.
2013-04-17 11:02:54 -04:00
Keith Bostic
2a89a594b8 More changes to the extension API (this is only part-way there, but it
builds cleanly so I'm going to commit it).  Change the extension API
handle methods to take the handle as their first argument, get rid of
the WT_EXTENSION_API.default_session method, instead, store a reference
to the enclosing WT_CONNECTION in the extension handle.

This push also includes a few changes that are part of creating a STEC
data source.
2013-04-17 10:00:15 -04:00
Keith Bostic
148b1c8bc3 Add a new WT_EXTENSION_API method that returns the default session for
a WT_CONNECTION, we need a session to use the other WT_EXTENSION_API
methods.

Remove the "exclusive" argument to the WT_DATA_SOURCE.create method:
we handle it internally and it's not documented anywhere (besides it's
not standard for the WT_SESSION.create method, if the WT_SESSION.create
method needs it, it should retrieve it from the configuration information).
2013-04-16 13:02:55 -04:00
Michael Cahill
c24be939fb Data source cleanup: fix some build warnings, exclude new function from the Java API, allow enough space in the wiredtiger_open cfg stack for a WIREDTIGER_CONFIG environment variable. 2013-04-12 11:01:12 +10:00
Keith Bostic
5488e656fa More work on data-source configuration support.
We can't stack a random set of entries into a cfg[] because we don't
want to allocate memory in the API.  Instead, whenever a method's
arguments are reconfigured, re-build the base configuration string by
appending the new configuration, and re-build the checks array, that way
we always have a single base configuration string and a single checks
array.

Re-work how we're handling lists, we can't expect the application to
crack them, they can be seriously messy.  If it's a list, create an
array of NULL-terminated refrences to nul-terminated strings (create
an "argv" array, in other words).  It's ugly, and the user has to free
the memory, but I don't see an alternative.
2013-04-11 15:58:42 -04:00
Keith Bostic
db2ce0c4e6 update for dist scripts. 2013-04-11 09:38:55 -04:00
Keith Bostic
cccb0ea538 Add a small example for list using strsep -- I'm pretty sure this is
wrong, but it's a placeholder.
2013-04-11 09:34:19 -04:00
Keith Bostic
10c5382883 Enhance some wording and the examples. 2013-04-11 08:49:54 -04:00
Keith Bostic
1ad8f5bd5a Add documentation and examples for setting custom configuration strings.
I'm doing it in the WT_DATA_SOURCE pages because that's the only part of
the system that can currently use application-specified config strings.
2013-04-10 15:21:50 -04:00
Keith Bostic
00b0fe3a1d Add a new method WT_EXTENSION_API::config that takes a cfg[] and returns
a configuration string's value.  Push that method through the KVS code
in test/format.
2013-04-10 13:58:34 -04:00