Commit graph

168 commits

Author SHA1 Message Date
Steve Vinoski
085e703a32 revised wterl tests to take advantage of eunit
Break the single wterl unit test into a series of tests separated by
function. Use eunit assert macros and add test setup and teardown
functions. Add descriptive messages for the tests for display under
"rebar -v eunit".
2012-02-17 23:16:00 -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
Steve Vinoski
642da3a44c Merge branch 'master' of github.com:basho/wterl 2012-02-16 13:32:34 -05:00
Steve Vinoski
635fd06bec add emacs backup files to .gitignore 2012-02-16 13:32:29 -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
Keith Bostic
442f66ef18 Make it a text file (newline at end). 2012-02-16 13:02:37 -05:00
Keith Bostic
33b25e6a2b Change the cache_size type to a string (it's usually something like 100MB,
not a pure integer).

Remove "exclusive" from the list of options, it's not in the 1.0 release.

Set the cache_size for the test, just to prove it works.
2012-02-16 10:54:21 -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