ExAliyunOts.get_row

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

get_row(instance, table_name, primary_keys, options \\ [])

View Source

Specs

get_row(instance(), table_name(), primary_keys(), options()) :: result()

Official document in Chinese | English

Example

import MyApp.TableStore

get_row "table1",
  [{"key1", "id1"}, {"key2", "id2"}],
  columns_to_get: ["name", "level"],
  filter: filter(("name[ignore_if_missing: true, latest_version_only: true]" == var_name and "age" > 1) or ("class" == "1"))

get_row "table2",
  [{"key", "1"}],
  start_column: "room",
  filter: pagination(offset: 0, limit: 3)

get_row "table3",
  [{"key", "1"}],
  transaction_id: "transaction_id"

Options

  • :columns_to_get, optional, fetch the special fields, by default it returns all fields, pass a field list to specify the expected return fields e.g. ["field1", "field2"].
  • :start_column, optional, specifies the start column when using for wide-row-read, the returned result contains this :start_column.
  • :end_column, optional, specifies the end column when using for wide-row-read, the returned result does not contain this :end_column.
  • :filter, optional, filter the return results in the server side, please see filter/1 for details.
  • :max_versions, optional, how many versions need to return in results, by default it is 1.
  • :time_range, optional, read data by timestamp range, support two ways to use it:
    • time_range: {start_timestamp, end_timestamp}, the timestamp in the range (include start_timestamp but exclude end_timestamp) and then will return in the results.
    • time_range: special_timestamp, exactly match and then will return in the results.
    • :time_range and :max_versions are mutually exclusive, by default use max_versions: 1 and time_range: nil.
  • :transaction_id, optional, read operation within local transaction.