New args for rocksdb:transaction_iterator()

This commit is contained in:
Ulf Wiger 2023-05-22 16:11:41 +02:00 committed by Thomas Arts
parent f2b6116d31
commit 71ebaf2d66
3 changed files with 6 additions and 5 deletions

View File

@ -4,7 +4,7 @@
{deps, {deps,
[ [
{sext, "1.8.0"}, {sext, "1.8.0"},
{rocksdb, {git, "https://gitlab.com/seanhinde/erlang-rocksdb.git", {ref,"9ae37839"}}}, {rocksdb, {git, "https://gitlab.com/barrel-db/erlang-rocksdb.git", {tag,"1.8.0"}}},
{hut, "1.4.0"} {hut, "1.4.0"}
]}. ]}.

View File

@ -1,8 +1,8 @@
{"1.2.0", {"1.2.0",
[{<<"hut">>,{pkg,<<"hut">>,<<"1.4.0">>},0}, [{<<"hut">>,{pkg,<<"hut">>,<<"1.4.0">>},0},
{<<"rocksdb">>, {<<"rocksdb">>,
{git,"https://gitlab.com/seanhinde/erlang-rocksdb.git", {git,"https://gitlab.com/barrel-db/erlang-rocksdb.git",
{ref,"9ae378391ffc94200bde24efcd7a4921eba688d0"}}, {ref,"fced5f637de7991c5948e28414ba3790b0476c4b"}},
0}, 0},
{<<"sext">>,{pkg,<<"sext">>,<<"1.8.0">>},0}]}. {<<"sext">>,{pkg,<<"sext">>,<<"1.8.0">>},0}]}.
[ [

View File

@ -1546,8 +1546,9 @@ rdb_iterator(R) -> rdb_iterator(R, []).
rdb_iterator(R, Opts) -> rdb_iterator(R, Opts) ->
rdb_iterator_(R, read_opts(R, Opts)). rdb_iterator_(R, read_opts(R, Opts)).
rdb_iterator_(#{db_ref := DbRef, cf_handle := CfH, activity := #{type := tx, handle := TxH}}, ROpts) -> rdb_iterator_(#{cf_handle := CfH, activity := #{type := tx, handle := TxH}}, ROpts) ->
rocksdb:transaction_iterator(DbRef, TxH, CfH, ROpts); %% Note: versions before 1.8.0 expected DbRef as first argument
rocksdb:transaction_iterator(TxH, CfH, ROpts);
rdb_iterator_(#{db_ref := DbRef, cf_handle := CfH}, ROpts) -> rdb_iterator_(#{db_ref := DbRef, cf_handle := CfH}, ROpts) ->
rocksdb:iterator(DbRef, CfH, ROpts). rocksdb:iterator(DbRef, CfH, ROpts).