ExAliyunOts.put_row

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

put_row(instance, table_name, primary_keys, attrs, options \\ [])

View Source

Official document in Chinese | English

Example

import MyApp.TableStore

put_row "table1",
  [{"key1", "id1"}],
  [{"name", "name1"}, {"age", 20}],
  condition: condition(:expect_not_exist),
  return_type: :pk

put_row "table2",
  [{"key1", "id1"}],
  [{"name", "name1"}, {"age", 20}],
  condition: condition(:expect_not_exist),
  transaction_id: "transaction_id"
  return_type: :pk

Options

  • :condition, required, please see condition/1 or condition/2 for details.
  • :return_type, optional, whether return the primary keys after put row, available options are :pk | :none, by default it is :none.
  • :transaction_id, optional, write operation within local transaction.