Skip to content

Commit 2f49eeb

Browse files
committed
update put example
1 parent 3489c76 commit 2f49eeb

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

docs/reference/globals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const created = await ProductTable.create({ name: 'Shirt', price: 9.5 });
5555
const record = await ProductTable.get(created.id);
5656

5757
// Insert or replace by ID
58-
await ProductTable.put({ ...record, price: 7.5 });
58+
await ProductTable.put({ id: record.id, name: record.name, price: 7.5 });
5959

6060
// Query for all products with a `price` less than `8.00`
6161
const query = {

docs/reference/resources/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const created = await ProductTable.create({ name: 'Shirt', price: 9.5 });
113113
const record = await ProductTable.get(created.id);
114114

115115
// Insert or replace by ID
116-
await ProductTable.put({ ...record, price: 7.5 });
116+
await ProductTable.put({ id: record.id, name: record.name, price: 7.5 });
117117

118118
// Query for all products with a `price` less than `8.00`
119119
const query = {

versioned_docs/version-4.5/reference/globals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const created = await ProductTable.create({ name: 'Shirt', price: 9.5 });
5555
const record = await ProductTable.get(created.id);
5656

5757
// Insert or replace by ID
58-
await ProductTable.put({ ...record, price: 7.5 });
58+
await ProductTable.put({ id: record.id, name: record.name, price: 7.5 });
5959

6060
// Query for all products with a `price` less than `8.00`
6161
const query = {

versioned_docs/version-4.5/reference/resource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const created = await ProductTable.create({ name: 'Shirt', price: 9.5 });
112112
const record = await ProductTable.get(created.id);
113113

114114
// Insert or replace by ID
115-
await ProductTable.put({ ...record, price: 7.5 });
115+
await ProductTable.put({ id: record.id, name: record.name, price: 7.5 });
116116

117117
// Query for all products with a `price` less than `8.00`
118118
const query = {

versioned_docs/version-4.6/reference/globals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const created = await ProductTable.create({ name: 'Shirt', price: 9.5 });
5555
const record = await ProductTable.get(created.id);
5656

5757
// Insert or replace by ID
58-
await ProductTable.put({ ...record, price: 7.5 });
58+
await ProductTable.put({ id: record.id, name: record.name, price: 7.5 });
5959

6060
// Query for all products with a `price` less than `8.00`
6161
const query = {

versioned_docs/version-4.6/reference/resources/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const created = await ProductTable.create({ name: 'Shirt', price: 9.5 });
113113
const record = await ProductTable.get(created.id);
114114

115115
// Insert or replace by ID
116-
await ProductTable.put({ ...record, price: 7.5 });
116+
await ProductTable.put({ id: record.id, name: record.name, price: 7.5 });
117117

118118
// Query for all products with a `price` less than `8.00`
119119
const query = {

versioned_docs/version-4.7/reference/globals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const created = await ProductTable.create({ name: 'Shirt', price: 9.5 });
5555
const record = await ProductTable.get(created.id);
5656

5757
// Insert or replace by ID
58-
await ProductTable.put({ ...record, price: 7.5 });
58+
await ProductTable.put({ id: record.id, name: record.name, price: 7.5 });
5959

6060
// Query for all products with a `price` less than `8.00`
6161
const query = {

versioned_docs/version-4.7/reference/resources/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const created = await ProductTable.create({ name: 'Shirt', price: 9.5 });
113113
const record = await ProductTable.get(created.id);
114114

115115
// Insert or replace by ID
116-
await ProductTable.put({ ...record, price: 7.5 });
116+
await ProductTable.put({ id: record.id, name: record.name, price: 7.5 });
117117

118118
// Query for all products with a `price` less than `8.00`
119119
const query = {

0 commit comments

Comments
 (0)