行の更新
テーブル内の単一行または複数行を1つ以上のカラム値で更新する場合、以下のメソッドを使用します。以下のコードスニペットで使用されている table は、テーブルオブジェクトです。
Note :ここで返されるPromiseは、content キーに更新された行の詳細の配列を含むオブジェクトに解決されます。
copy
//Create an object with the details to be updated referring to the corresponding ROWID
var details = [
{ "Name": "John Denver", "Age": 25, "ROWID": 1510000000085482},
{ "Name": "Jill Scott", "Age": 39, "ROWID": 1510000000113707}
];
//詳細を使用してRowオブジェクトを更新する
var datastore = catalyst.table;
var table = datastore.tableId('SampleTable');
var updatePromise = table.updateRow(details);
updatePromise
.then((response) => {
console.log(response.content);
})
.catch((err) => {
console.log(err);
});
受け取るサンプルレスポンスを以下に示します。レスポンスは両方のバージョンで同じです。
Web SDK
copy
[
{
CREATORID: "2136000000006003",
MODIFIEDTIME: "2021-08-24 13:22:14:718",
CREATEDTIME: "2021-08-24 13:12:55:999",
Name: "John Denver",
Age: 25
ROWID: "2136000000034043"
},
{
CREATORID: "2136000000006003",
MODIFIEDTIME: "2021-08-24 13:22:14:728",
CREATEDTIME: "2021-08-24 13:12:56:001",
Name: "Jill Scott",
Age: 39
ROWID: "2136000000034045"
}
]
最終更新日 2026-03-24 17:38:39 +0530 IST
Yes
No
Send your feedback to us
Skip
Submit