ExAliyunOts.stream_range

You're seeing just the function stream_range, go back to ExAliyunOts module for more information.
Link to this function

stream_range(instance, table_name, inclusive_start_primary_keys, exclusive_end_primary_keys, options \\ [])

View Source

As a wrapper built on get_range/5 to create composable and lazy enumerable stream for iteration.

Example

import MyApp.TableStore

stream =
  stream_range table_name1,
    [{"key1", 1}, {"key2", :inf_min}],
    [{"key1", 4}, {"key2", :inf_max}],
    direction: :forward

Enum.to_list(stream, fn
  {:ok, %{rows: rows} = response} ->
    # process rows
  {:error, error} ->
    # occur error
end)

Options

Please see options of get_range/5 for details.