すべてのプロダクト
Search
ドキュメントセンター

:特定の列に値を追加する方法

最終更新日:Mar 23, 2020

列の値を 1 ずつ増やすには、次の手順を実行します。

  1. row = getRow(primary_key, 'col') // Read the column value.
  2. old_value = row['col'] // Record the old value of this column.
  3. row['col'] = old_value + 1 // Calculate the new value.
  4. updateRow(row, condition: row['col'] == old_value) // Write the new value to the column. You must set the condition check to make sure that this column retains the old value when writing the new value; that is, the column is not modified by others simultaneously.