EctoTablestore.Repo.get_range
get_range
, go back to EctoTablestore.Repo module for more information.
Specs
get_range( schema(), start_primary_keys :: list() | binary(), end_primary_keys :: list(), options() ) :: {nil, nil} | {list(), nil} | {list(), binary()} | {:error, term()}
Get multiple structs by range from one table, rely on the conjunction of the partition key and other primary key(s).
Options
:direction
, by default it is:forward
, set it as:forward
to make the order of the query result in ascending by primary key(s), set it as:backward
to make the order of the query result in descending by primary key(s).:columns_to_get
, string list, return the specified attribute columns, if not specify this field all attribute columns will be return.:start_column
, string, used as a starting column for Wide Column read, the return result contains this as starter.:end_column
, string, used as a ending column for Wide Column read, the return result DON NOT contain this column.:limit
, optional, the maximum number of rows of data to be returned, this value must be greater than 0, whether this option is set or not, there returns a maximum of 5,000 data rows and the total data size never exceeds 4 MB.:transaction_id
, read under local transaction in a partition key.:filter
, used as a filter by condition, support">"
,"<"
,">="
,"<="
,"=="
,"and"
,"or"
and"()"
expressions.The
ignore_if_missing
option can be used for the non-existed attribute column, for example: An attribute column does not exist meanwhile set it astrue
, will ignore this match condition in the return result; An existed attribute column DOES NOT suit for this use case, the match condition will always affect the return result, if match condition does not satisfy, they won't be return in result.filter: filter(({"name", ignore_if_missing: true} == var_name and "age" > 1) or ("class" == "1"))