Skip to content

Commit d76ceef

Browse files
committed
Doc tweaks
1 parent d1a1e56 commit d76ceef

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

doc/api.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3321,7 +3321,7 @@ It should be an array or an object, depending on the structure of the
33213321
[`binds parameter`](#executemanybinds).
33223322

33233323
Each value in the `bindDefs` array or object should be an object
3324-
containing the keys `dir`, `maxSize`, and `type` for each bind
3324+
containing the keys `dir`, `maxSize`, and `type` for one bind
33253325
variable, similar to how [`execute() bind
33263326
parameters`](#executebindParams) are identified.
33273327

@@ -12886,15 +12886,20 @@ If your SODA document write operations are mostly independent of each
1288612886
other, this removes the overhead of explicit
1288712887
[`connection.commit()`](#commit) calls.
1288812888

12889-
When deciding how to commit transactions, beware of transactional
12890-
consistency and performance requirements. If you are inserting or
12891-
updating a large number of documents, you should turn `autoCommit` off
12892-
and issue a single, explicit [`connection.commit()`](#commit) after
12893-
all documents have been processed.
12889+
When deciding how to commit transactions, beware of transactional consistency
12890+
and performance requirements. If you are using individual SODA calls to insert
12891+
or update a large number of documents with individual calls, you should turn
12892+
`autoCommit` off and issue a single, explicit [`connection.commit()`](#commit)
12893+
after all documents have been processed. (Also consider using
12894+
[`sodaCollection.insertMany()`](#sodacollinsertmany) or
12895+
[`sodaCollection.insertManyAndGet()`](#sodacollinsertmanyandget) which have
12896+
performance benefits).
1289412897

1289512898
If you are not autocommitting, and one of the SODA operations in your
12896-
transaction fails, then your application must explicitly roll back the
12897-
transaction with [`connection.rollback()`](#rollback).
12899+
transaction fails, then previous uncommitted operations will not be rolled back.
12900+
Your application should explicitly roll back the transaction with
12901+
[`connection.rollback()`](#rollback) to prevent any later commits from
12902+
committing a partial transaction.
1289812903

1289912904
Note:
1290012905

0 commit comments

Comments
 (0)