You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3dc3a56
Browse filesBrowse the repository at this point in the historyBrowse files
The synchronous API reads rows one at a time and its option parsing only
recognizes queryTimeout, so `statement.all(undefined, { batchSize: 250 })`
binds the options object and throws, and defaultBatchSize is ignored.
Copy file name to clipboardExpand all lines: docs/api.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,9 @@ You can use the `options` parameter to specify various options. Options supporte
23
23
-`authToken`: authentication token for the provider URL (optional).
24
24
-`timeout`: number of milliseconds to wait on locked database before returning `SQLITE_BUSY` error
25
25
-`defaultQueryTimeout`: default maximum number of milliseconds a query is allowed to run before being interrupted with `SQLITE_INTERRUPT` error
26
-
-`defaultBatchSize`: default number of rows that the promise API reads per native iterator call. It must be an integer from 1 through 10,000 and defaults to 1.
26
+
-`defaultBatchSize`: default number of rows that the promise API (`libsql/promise`) reads per native iterator call. It must be an integer from 1 through 10,000 and defaults to 1. The synchronous API ignores it.
27
27
28
-
Use `batchSize` in `queryOptions` to override `defaultBatchSize` for one `all()` or `iterate()` call. When the query has no bind parameters, pass `undefined` before the options: `statement.all(undefined, { batchSize: 250 })`.
28
+
With the promise API, use `batchSize` in `queryOptions` to override `defaultBatchSize` for one `all()` or `iterate()` call. When the query has no bind parameters, pass `undefined` before the options: `await statement.all(undefined, { batchSize: 250 })`. The synchronous API does not support `batchSize`.
29
29
30
30
The function returns a `Database` object.
31
31
@@ -336,7 +336,7 @@ Executes the SQL statement and returns an array of the resulting rows.
0 commit comments