Skip to content

Commit

Permalink
docs: refactor writeAtLeastOnce doc (#2172)
Browse files Browse the repository at this point in the history
fixes: #2164
  • Loading branch information
alkatrivedi authored Oct 22, 2024
1 parent 688b4cc commit 7a516f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3579,7 +3579,7 @@ class Database extends common.GrpcServiceObject {
*
* @example
* ```
* const {Spanner} = require('@google-cloud/spanner');
* const {Spanner, MutationSet} = require('@google-cloud/spanner');
* const spanner = new Spanner();
*
* const instance = spanner.instance('my-instance');
Expand All @@ -3597,7 +3597,7 @@ class Database extends common.GrpcServiceObject {
* });
*
* try {
* const [response, err] = await database.writeAtLeastOnce(mutations, {});
* const [response] = await database.writeAtLeastOnce(mutations, {});
* console.log(response.commitTimestamp);
* } catch(err) {
* console.log("Error: ", err);
Expand Down
2 changes: 1 addition & 1 deletion test/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ describe('Database', () => {

it('should return CommitResponse on successful write using await', async () => {
sinon.stub(database, 'writeAtLeastOnce').resolves([RESPONSE]);
const [response, err] = await database.writeAtLeastOnce(mutations, {});
const [response] = await database.writeAtLeastOnce(mutations, {});
assert.deepStrictEqual(
response.commitTimestamp,
RESPONSE.commitTimestamp
Expand Down

0 comments on commit 7a516f5

Please sign in to comment.