As of right now the SRFI doesn't expose a predicates for the two disjoint types it expose. Should I add `store?` and `transaction?` predicates to the specification?
- begin! creates a transaction, it might have side effects like allocating specific cursors or opening a new session but this will not affect user code
- rollback! will end the transaction, the database will be unaltered
- commit! will also end the transaction but the database will be affected. In some sens, the setter is already expressing that it will have a side effect. Again not sure the exclamation mark is required here.
I am willing to remove the exclamation mark for this three procedures. What do you think?
C) Range vs. prefix
Right now, procedure "range" is specified to return a generator over the key-value pairs that starts with the parameter PREFIX. This is unlike what FDB does in
fdb_transaction_get_range where the range is specified using "start" and "end" bytes. Also see the
paragraph about KeySelector. Similarly
python bindings of leveldb do specify start and end (
ref). I think I will change "range" definition to look more like fdb_transaction_get_range. And add a "store-prefix" procedure that has the same definition as current "store-range" procedure.
D) Config
As you can see in the
pull-request, I replaced ARGS rest argument with a single CONFIG parameter that is an alist. I think I will also specify the expected keys in that alist along a few expected values, that may or may not be supported by implementations. But when applicable the the configuration must be the same across implementations. That is it will ease portability.