Commit graph

129 commits

Author SHA1 Message Date
Steve Vinoski
b2807e2c14 upgrade to WiredTiger version 1.3.0
Since 1.3.0 folded the session sync function into the session checkpoint
function, the wterl:sync/(2,3) functions are now renamed
wterl:checkpoint/(1,2). See
http://source.wiredtiger.com/1.3.0/upgrading.html for details.
2012-09-17 10:58:48 -04:00
Steve Vinoski
6c808da7af update to WiredTiger 1.2.2 2012-06-20 15:24:16 -04:00
Steve Vinoski
d766ca1790 update to WiredTiger 1.2.1 2012-06-15 08:54:13 -04:00
Gregory Burd
57a70dc331 Merge branch 'master' of github.com:basho/wterl
Conflicts:
	c_src/build_deps.sh
2012-06-04 09:18:15 +01:00
Gregory Burd
d14e171f4b WIP: Update to WiredTiger 1.2.0 release 2012-06-04 09:16:35 +01:00
Steve Vinoski
3e676f82ad update to WiredTiger 1.1.5 2012-04-26 10:16:52 -04:00
Steve Vinoski
7ca3bb4385 update to WiredTiger 1.1.4 2012-04-16 19:55:12 -04:00
Steve Vinoski
509cc92cfc fix copyright dates 2012-04-09 16:49:26 -04:00
Steve Vinoski
cd8a563aa4 apply evict-fixes patch to wiredtiger 1.1.3 2012-04-07 09:49:00 -04:00
Steve Vinoski
2e37fc1bd1 avoid using cursor-fetched values after closing cursor
The wterl:session_get function was fetching a value using a cursor, then
closing the cursor, and then trying to use the fetched value to create the
return binary. According to the WiredTiger documentation, this is a no-no
-- a value is good only until the next operation on the cursor used to
fetch it. We've been seeing occasional segmentation violations in the
memcpy for the fetched value, and this might explain it.
2012-04-04 20:13:58 -04:00
Steve Vinoski
fbc6f9b440 update to WiredTiger 1.1.3
Update to WiredTiger 1.1.3 and also reinstate checking that
wterl:session_create returns ok.
2012-04-04 15:20:08 -04:00
Steve Vinoski
ca36db5709 NIF code cleanup
Use camel case for type names, make brace placement consistent.
2012-04-02 18:01:02 -04:00
Steve Vinoski
ea3e73c0d7 update to WiredTiger 1.1.2 2012-03-28 10:20:42 -04:00
Steve Vinoski
221df5337d update to WiredTiger 1.1.1 2012-03-12 10:22:22 -04:00
Keith Bostic
cddaf8e1d9 Replace enif_alloc_binary/enif_make_binary call pairs with a single
enif_make_new_binary call.
2012-02-20 13:30:09 -05:00
Steve Vinoski
6c0f14da6e add fold_keys, and funs for getting keys and values via cursors
Change cursor_{next,prev} to return {ok, Key, Value}. Add
cursor_{next,prev}_{key,value} functions to allow cursor movement
followed by fetch of either key or value. Add fold_keys function. Add
unit tests for these changes. Also specify "inorder" on the unit test
generator functions, since the tests they specified are intended to be
run that way.
2012-02-19 20:20:38 -05:00
Keith Bostic
3323cf5844 I messed up some minor style/indentation, ignore all calls to cursor->close
(that's not correct, but it will do for now).
2012-02-17 09:07:25 -05:00
Steve Vinoski
7e6d947765 make wterl an app, cache the WT connection
Add app, supervisor, and worker to open and cache the database
connection. Revert to using binaries for WT config in order to allow
wterl callers to use proplists for configuration. Change {error,
not_found} to not_found return values from wterl.
2012-02-17 00:42:22 -05:00
Keith Bostic
c89d6deaea minor stylistic updates. 2012-02-16 19:24:18 -05:00
Keith Bostic
212a735339 Implement the rest of the interesting cursor operations (insert, update, remove). 2012-02-16 19:06:56 -05:00
Keith Bostic
33b8ea60cf Implement the rest of the session methods.
Format pass, naming pass.
2012-02-16 18:44:28 -05:00
Keith Bostic
7a19859ede Rename table_{create,drop} session_{create,drop}, they operate on things
other than tables, and we no longer hardcode the object type.
2012-02-16 15:07:44 -05:00
Keith Bostic
6f0357b4c5 Fix cursor.{open,close}, it now works.
Add support for cursor.{next,prev,search,search_near,reset}.

Change table_create to no longer pass back the table name, WiredTiger's
model is that you pass in the object name each time (and the current
model means we can't drop the table before we run the tests).

Upgrade to the WiredTiger 1.0 release, there's a bug where static
libraries aren't created correctly, for now create shared libraries
for wterl.
2012-02-16 14:57:28 -05:00
Keith Bostic
5a7936bf1c Change the cursor open/close code to match other resources (RESOURCE structure that holds the
WiredTiger resource).

Change names to be consistent, open/XXX/close.

Add cursor next call.
2012-02-16 13:22:03 -05:00
Gregory Burd
816e916658 Add cursor create/close functions. 2012-02-15 14:31:40 -05:00
Steve Vinoski
d77abe34d7 add missing include of string.h in wterl.c 2012-02-15 09:59:28 -05:00
Steve Vinoski
b93946a5e0 more WiredTiger prototyping
A number of changes:

* Added exported functions to close connections and sessions.

* Added exported functions to create and drop tables. Currently not
  happy with the shape of these functions, though, as they treat
  tables in Erlang just as strings, and they force users of sessions
  to have to pass both sessions and tables into get/put/delete
  operations. It might be better to take a table identifier as part of
  the session creation function and store that identifier with the
  session resource.

* Added implementations for key-value get, put, and delete.

* Added very minimal unit tests for the changes above.
2012-02-08 17:31:16 -05:00
Dave Smith
dcb4270f9d Basics of conn/session instantiation working 2011-12-21 21:46:35 -07:00
Dave Smith
2cdf2584f2 Initial commit 2011-12-18 13:54:46 -07:00