~umgeher/utfs-core

2aebac3c7342216f8f4c506867642914dc5cfc70 — Umgeher Torgersen 11 months ago 2f519d3
tl range
2 files changed, 7 insertions(+), 13 deletions(-)

D src/utfs_core_tl_i_seek.erl
A src/utfs_core_tl_range.erl
D src/utfs_core_tl_i_seek.erl => src/utfs_core_tl_i_seek.erl +0 -13
@@ 1,13 0,0 @@
-module(utfs_core_tl_i_seek).

-export([seek/2]).

seek(Timeline, <<"e", TS/binary>> = Event) when is_binary(Timeline) ->
    {ok, UID} = utfs_core:tl_uid(Timeline),
  

    {ok, Last} = utfs_core:tl_last(Timeline),
    LastBin = erlang:integer_to_binary(Last),
    {ok, set} = utfs_core:kv_set(UID, <<"_i", LastBin/binary>>, Event),
    {ok, set} = utfs_core:kv_set(UID, <<"_l">>, Last),
    {ok, append}.

A src/utfs_core_tl_range.erl => src/utfs_core_tl_range.erl +7 -0
@@ 0,0 1,7 @@
-module(utfs_core_tl_range).

-export([range/4]).

range(Timeline, Index, {K0, K1}, Options) ->
    {ok, UID} = utfs_core:tl_uid(Timeline),
    utfs_core:si_range(UID, Index, {K0, K1}, Options).