Jonas Schäfer
d2b0ee057a
Re-work the class hierarchy of cursors and transactions
...
MDBRWTransaction now inherits from MDBROTransaction. Both
transaction types will free their cursors before aborting or
committing. In addition, transactions are now virtual classes.
The reason for this is that RW and RO transactions are handled
very differently in LMDB. Nevertheless, it is very useful to be
able to write read-only code in a way which also can use an RW
transaction. This saves code duplication or unnecessary templates.
Since the only methods which are reqiured to be virtual on
transactions for this to work are the destructor and the
abort/commit methods, the overhead should be neglegible.
This also comes in very handy when going forward to implement
nested transactions, because it is not possible to nest RO
transactions below RW transactions, exacerbating the issue
described above.
Fixes #7 en passant.
2019-11-11 21:23:20 +01:00
bert hubert
c0cc016f3a
add get_struct_ptr for speedup
2019-06-24 11:16:03 +02:00
bert hubert
e02d654dfe
namespace cleanliness
2019-02-06 11:08:55 +01:00
bert hubert
9c5bb43cb5
solve crashes when using read-only cursor
2019-01-13 21:35:02 +01:00
bert hubert
99b4caf61c
enhance multi test a bit
2019-01-09 10:30:59 +01:00
bert hubert
bdcd9150a9
unify RO and RW cursor operations, move serFromString to a view
2019-01-09 09:58:04 +01:00
bert hubert
7dac111b02
to work around clang issue, keyConv is now very ugly, but completely generic
2019-01-05 14:40:28 +01:00
bert hubert
505d31fd89
add range tests (lower_bound)
2019-01-05 14:40:04 +01:00
bert hubert
a6ee07d8ef
add rc checking to cursors, add lower_bound(), next()
2019-01-05 14:38:52 +01:00
bert hubert
66a6adaf10
makefile was silly with -lboost_serialization
2019-01-05 14:38:21 +01:00
bert hubert
cb2ed50e1f
getKey for typed +const correctness
2019-01-04 20:51:04 +01:00
bert hubert
f35ffb8bd8
fix boost version sensing
2018-12-28 22:02:29 +01:00
bert hubert
063e658aa9
pare down boost apt-get for travis
2018-12-28 19:25:39 +01:00
bert hubert
8851f18cbe
better default init of MDBOutVal in typed
2018-12-28 19:21:32 +01:00
bert hubert
30b9a78059
adapt to older boost on travis
2018-12-28 19:14:00 +01:00
bert hubert
6790f50612
add boost & catch2
2018-12-28 19:00:09 +01:00
bert hubert
a35390622c
add lmdb to travis
2018-12-28 18:39:43 +01:00
bert hubert
f977301e94
expand tests to time_t indexes, found bug in our keyconv!
2018-12-28 16:45:44 +01:00
bert hubert
fd9e5841bc
add travis tests
2018-12-28 16:35:32 +01:00
bert hubert
b3eb2a03cb
add tests, prefix_range
2018-12-28 16:33:20 +01:00
bert hubert
59b3b602fa
lots of changes
2018-12-27 17:49:41 +01:00
bert hubert
654985e981
improve error message
2018-12-23 16:18:37 +01:00
bert hubert
4c1b5e404c
get now returns an id, making id=0 special, split out our sample code
2018-12-17 14:56:01 +01:00
bert hubert
3277381170
s/insert/put/
2018-12-16 21:46:53 +01:00
bert hubert
654e782b5f
add a lot of comments for future ahu
2018-12-16 20:28:49 +01:00
bert hubert
bb981d6d31
add compound keys and iterator--
2018-12-16 15:58:38 +01:00
bert hubert
29aaa63a69
forgot this file
2018-12-15 23:22:06 +01:00
bert hubert
a144209f12
find, begin
2018-12-15 21:06:47 +01:00
bert hubert
5af0bb3e67
readonly transactions, common implementation
2018-12-15 17:53:29 +01:00
bert hubert
f11d89dd4a
more docs + cleanups
2018-12-15 01:54:29 +01:00
bert hubert
d3f94d67c3
tuplify, macrofy, add cardinality, templated find, get etc
2018-12-15 00:46:15 +01:00
bert hubert
ada45b45ba
interim pre-tuple
2018-12-14 23:46:46 +01:00
bert hubert
d98d657765
eradicate some MDB_dbi use, more string_view
2018-12-14 23:00:44 +01:00
bert hubert
ac4876876e
make MDBDbi a value type, improve some error messages, make a delete with no data part
2018-12-13 23:16:46 +01:00
bert hubert
3dd2f703db
namespace cleanup, reennable support for c++2011
2018-12-10 22:08:49 +01:00
bert hubert
34f8c2188c
better docs
2018-12-10 17:42:25 +01:00
bert hubert
f15076bc2b
make everything compile again
2018-12-10 15:02:36 +01:00
bert hubert
0a22c24024
big mdbval redo
2018-12-10 14:51:02 +01:00
bert hubert
ac9da997a0
fix mixup with mode & flags parameters, implement transaction restart in case of resize
2018-12-10 10:27:07 +01:00
bert hubert
348e9bd730
add multi
2018-12-09 14:37:42 +01:00
bert hubert
273c32435b
add unreport, check errors better
2018-12-09 14:37:08 +01:00
bert hubert
2a8240cd1e
improve error reporting, add mutex to database opening
2018-12-08 20:58:19 +01:00
bert hubert
5fcc2a083a
make basic-example drop database contents
2018-12-08 20:57:48 +01:00
bert hubert
5cbaf71227
docs
2018-12-08 20:57:39 +01:00
bert hubert
35c5365125
new example, 'scale-example'
2018-12-08 20:57:28 +01:00
bert hubert
c40719f671
some docs, basic example
2018-12-08 14:08:26 +01:00
bert hubert
e664945846
wip
2018-12-07 18:17:03 +01:00
bert hubert
9eafb01508
for hyc
2018-12-07 14:16:21 +01:00
bert hubert
8665a8bf08
interim
2018-12-07 13:52:17 +01:00
bert hubert
bebb29f541
interim
2018-12-07 11:25:49 +01:00