Michael Cahill
27a1bd8606
Use the swig "-thread" command line flag, it wraps our extension functions correctly as well.
2011-09-08 18:26:44 +10:00
Don Anderson
e7bdd917b0
Use an adaptor class for iterable, so we don't have to rename 'wt_cursor.next'.
...
refs #31
--HG--
extra : rebase_source : 0dcc43912afc6a15566f18551faf64c6369fabb9
2011-09-06 06:44:21 -04:00
Michael Cahill
b12f6c5458
Fix up various build issues:
...
* make test programs link statically by default
* depende on libwiredtiger.la so tests are relinked when the library changes
* don't bother with helper targets for test/insert
2011-09-06 07:09:39 +10:00
Michael Cahill
c545f4fc29
Split out the Python and examples from the top level Makefile.
2011-09-02 21:53:51 +10:00
Michael Cahill
9018517cb6
Add a cursor.reset operation to the Python API so that tests can use a cursor for inserts, then loop through the whole table in a natural way.
2011-09-02 21:53:51 +10:00
Michael Cahill
45c9f74209
Add some missing error checking to extension functions in the Python API.
2011-08-29 15:46:55 +10:00
Michael Cahill
574d7b43cf
Add libtool to the build.
...
While in the area, add a pkg-config file.
* * *
[mq]: build-fixes
2011-08-26 15:28:43 +10:00
Don Anderson
5806941282
Release the Global Interpreter Lock during all WT calls.
...
Otherwise there will be no real multithreading for WT.
refs #31
--HG--
extra : rebase_source : 3c162bf4e42d21aebe4a3421d5d90feb2ae48ef4
2011-08-19 09:44:07 -04:00
Michael Cahill
d1ac7e8e57
Replace wiredtiger_recno_t with uint64_t.
...
closes #71
2011-07-22 09:40:58 +10:00
Michael Cahill
fdf68e5060
Update Python proxy objects after calling "close" methods to discard their pointers. This avoids common cases that can lead to segfaults.
...
Note that this isn't a complete solution: bad Python code can still reference a
freed pointer (e.g., by using a cursor after closing the session that was used
to allocate the cursor). Solving that problem completely would involve
tracking ownership in Python.
2011-07-16 00:12:42 +10:00
Michael Cahill
5138ce4074
Supply default values for "config" parameters in the Python API, remove event
...
handlers from the interface
2011-07-16 00:08:47 +10:00
Michael Cahill
a2dbd9a5aa
Fix several issues in the unit tests and the Python API so that all unit tests now pass:
...
* if an open_cursor operation fails, don't attempt to modify the cursor
* the cursor iteration code has to stop on WT_NOTFOUND
* some config strings have been renamed (internal_* rather than intl_*)
2011-07-15 09:42:47 +10:00
Michael Cahill
a2af418581
Pass CFLAGS and LDFLAGS into the Python build explicitly in the Makefile.
2011-07-14 16:58:51 +10:00
Michael Cahill
f582b2b532
In the Python build, only set extra_*_args if CFLAGS or LDFLAGS are set.
2011-07-14 16:51:51 +10:00
Michael Cahill
04dc7ec4ab
Pass CFLAGS and LDFLAGS through to the Python build.
2011-07-14 16:44:13 +10:00
Michael Cahill
93ab4058e7
Implement full packing and unpacking for multi-column keys/values.
...
--HG--
rename : lang/python/packing.py => lang/python/fpacking.py
rename : lang/python/intpack-test.py => lang/python/packing-test.py
rename : src/api/pack.c => src/schema/packing.c
rename : test/packing/intpack-test.c => test/packing/packing-test.c
2011-05-26 14:04:46 +10:00
Michael Cahill
b14ab0e44e
Tuning and fixes for integer packing, add the Python implementation and test that both produce the same results.
...
refs #50
2011-05-24 21:32:38 +10:00
Michael Cahill
14b4b467e2
Support multi-column keys and values in the Python API (in future).
...
refs #1
2011-05-12 09:22:03 +10:00
Don Anderson
92d3d7b641
Add support for wiredtiger exceptions in python.
...
Added a subtest of test001 that makes sure exceptions are working.
refs #31
2011-04-28 17:05:35 -04:00
Don Anderson
2b9689319f
Reworked python iterable to handle arbitrary types and added a test case (test003)
...
for it, using combinations of string/int. int currently not implemented by underlying
interface, so only one test works.
refs #31
--HG--
extra : rebase_source : 099ec48ce6b83f749a9f0acd9f01c1986ae2619d
2011-05-09 10:15:25 -04:00
Michael Cahill
c0650abe86
Another fix for relative paths in the Python build: setup.py wants to own the tree.
2011-04-26 17:34:23 +10:00
Michael Cahill
3a6dc4749e
Fix Python build again: split SWIG out of setup.py, we want to distribute the
...
results so SWIG isn't required by users to build the Python API. This also
addresses some annoyances with paths, since we want to build in a different
place from the Python sources.
2011-04-26 17:24:21 +10:00
Michael Cahill
62134154c1
Have the Python API deal with packing and unpacking of keys and values.
...
--HG--
rename : lang/python/src/wiredtiger/__init__.py => lang/python/packing.py
2011-04-26 15:48:06 +10:00
Michael Cahill
a2e34fae27
Keep the Python sources in lang/python: that's what we will want to distribute.
2011-04-26 15:46:48 +10:00
Michael Cahill
69cd69d59b
Build the Python API into the build directory.
...
* * *
[mq]: config-script
2011-03-11 12:03:44 +11:00
Don Anderson
1fa4961959
Turned 3 typemaps for self elimination into a single macro - (from mjc)
...
Fixed error I made in local merge of wiredtiger.in
refs #31
--HG--
extra : rebase_source : 44278684b451925d6a9c53c955d7bed04ed0d6f2
2011-04-14 13:52:27 -04:00
Don Anderson
5a70018b45
Do 'extra self elimination' in SWIG by using typemaps with two input args.
...
This cleans up the ugly stuff in my last local commit. Also,
the extra 'self' argument in wiredtiger.in need not be named
'thisconnection', 'thiscursor', 'thissession', but simply 'connection',
'cursor' or 'session'. That's another clean up from the last local commit.
--HG--
extra : rebase_source : 08b67fedcc32756325cf7b68522a64f29eae206b
2011-04-04 14:59:29 -04:00
Don Anderson
8d2fdaa955
Added ex_access.py, and added typemaps, etc. to make it all work.
...
This changeset also includes configure and Make.base changes to
force -g on for setup.py, and to *disable* -O if debug is enabled.
That's probably not wanted in the release tree, but is essential
for debugging SWIG.
refs #31
--HG--
extra : rebase_source : d6eb4ffab30aa8901b73467e038cb82168308545
2011-03-31 07:44:57 -04:00
Michael Cahill
47a8ea8c7c
Initial steps towards a Python API. Rename 'del' to 'remove': that seems safe across languages.
...
Remove underscores from struct names for now: that should be transparent to applications but avoids messiness in the Python API.
refs #31
2011-03-10 22:17:48 +11:00
Michael Cahill
7c6c8d65f4
[ #23 ] Permit JSON config strings. Change "column set" to "column group" / "colgroup" consistently. Change schema configration to use unique JSON-friendly keys, so "index.name=(columns)" instead of "index=name(columns)".
...
--HG--
branch : mjc
2011-01-28 16:34:15 +11:00
Michael Cahill
2a4f3179f5
Add code examples for every API call, add config parameters to commit and rollback.
...
--HG--
branch : mjc
rename : examples/c/ex_hello.c => examples/c/ex_all.c
2011-01-13 10:50:42 +11:00
Michael Cahill
dbce4c3f3d
API changes and example updates baed on Keith's feedback.
...
--HG--
branch : mjc
2011-01-07 16:05:25 +11:00
Michael Cahill
84c3666460
Incorporated Keith's latest feedback, switched XXX to @todo...
...
--HG--
branch : mjc
rename : docs/src/overview.dox => docs/src/introduction.dox
rename : include/wiredtiger.h => include/wiredtiger_ext.h
2011-01-06 21:45:04 +11:00
Michael Cahill
c823027e57
More work on code samples, Python implementation of the API using Berkeley DB.
...
--HG--
branch : mjc
rename : examples/c/ex_hello.c => examples/c/ex_cursor.c
rename : examples/c/ex_hello.c => examples/c/ex_extending.c
rename : examples/c/ex_hello.c => examples/c/ex_pack.c
rename : examples/c/ex_hello.c => examples/c/ex_process.c
rename : examples/c/ex_hello.c => examples/c/ex_transaction.c
2011-01-06 10:57:13 +11:00
Michael Cahill
e51557e46f
More editing of documentation, expanding of examples.
...
--HG--
branch : mjc
extra : transplant_source : %16%C1%5B%C8%91F%D3%D0%AA%C2%1BY%FE%F6%27%AC%02%16%D9I
2011-01-04 17:48:09 +11:00
Michael Cahill
b65420c0bd
More work on documentation and examples, removed some things from the API, incorporated some of Keith's feedback.
...
--HG--
branch : mjc
rename : examples/c/ex_schema.c => examples/c/ex_call_center.c
extra : transplant_source : %AE%E9%C4%0B%3A%C5%0EH%E1%A8%A2L%E6%D2%D6%40G%9Dzq
2010-12-16 22:54:09 +11:00
Michael Cahill
f141326e73
Added some Java and Python tests of packing and unpacking.
...
--HG--
branch : mjc
extra : transplant_source : %C1p%BB%21%11%9F%F7%07h%A9%AF7%B2%27%2A%DE%98_%BD%B4
2010-12-14 09:27:31 +11:00
Michael Cahill
2365ff03f4
Started adding some skeleton tests.
...
--HG--
branch : mjc
extra : transplant_source : .T%A9%E7%F3%0E%A620%F1G%C2%1E%C4%60%88%14%29%20%23
2010-12-10 11:27:05 +11:00
Michael Cahill
fc95ac6031
More complete Java API, more work on the column example.
...
--HG--
branch : mjc
extra : transplant_source : %A3K%FF%A10%3C%D5Z0%C2%EC%23%18%17%83%BBb%8A%A3n
2010-12-09 14:39:30 +11:00
Michael Cahill
9b49c03119
More work on the Java API: now has a client.
...
--HG--
branch : mjc
extra : transplant_source : %AF%1E%F5LbQ%82%FA%22GS%9F%AA%0D%DA%B9%C2%0D%93%00
2010-12-02 23:15:31 +11:00
Michael Cahill
024b514d39
Beginnings of a Java client API implementation.
...
--HG--
branch : mjc
rename : Doxyfile => docs/Doxyfile
extra : transplant_source : O%FA%B3%84%98%D2%10%B4%B5%B7%BD%CA%86V%F4b%3Ff%0Cu
2010-12-02 13:24:06 +11:00