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
Copy file name to clipboardExpand all lines: README.md
+1
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-spanner/tre
112
112
| Updates the default leader of an existing database |[source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-update-default-leader.js)|[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-update-default-leader.js,samples/README.md)|
113
113
| Updates a Cloud Spanner Database. |[source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/database-update.js)|[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/database-update.js,samples/README.md)|
114
114
| Datatypes |[source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/datatypes.js)|[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/datatypes.js,samples/README.md)|
115
+
| Runs an execute sql request with directed read options |[source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/directed-reads.js)|[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/directed-reads.js,samples/README.md)|
115
116
| Delete using DML returning. |[source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/dml-returning-delete.js)|[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml-returning-delete.js,samples/README.md)|
116
117
| Insert using DML returning. |[source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/dml-returning-insert.js)|[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml-returning-insert.js,samples/README.md)|
117
118
| Update using DML returning. |[source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/dml-returning-update.js)|[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/dml-returning-update.js,samples/README.md)|
Copy file name to clipboardExpand all lines: samples/README.md
+18
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ and automatic, synchronous replication for high availability.
37
37
*[Updates the default leader of an existing database](#updates-the-default-leader-of-an-existing-database)
38
38
*[Updates a Cloud Spanner Database.](#updates-a-cloud-spanner-database.)
39
39
*[Datatypes](#datatypes)
40
+
*[Runs an execute sql request with directed read options](#runs-an-execute-sql-request-with-directed-read-options)
40
41
*[Delete using DML returning.](#delete-using-dml-returning.)
41
42
*[Insert using DML returning.](#insert-using-dml-returning.)
42
43
*[Update using DML returning.](#update-using-dml-returning.)
@@ -517,6 +518,23 @@ __Usage:__
517
518
518
519
519
520
521
+
### Runs an execute sql request with directed read options
522
+
523
+
View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/directed-reads.js).
524
+
525
+
[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/directed-reads.js,samples/README.md)
Copy file name to clipboardExpand all lines: src/index.ts
+12
Original file line number
Diff line number
Diff line change
@@ -110,13 +110,17 @@ export type GetInstanceConfigOperationsCallback = PagedCallback<
110
110
* Session pool configuration options.
111
111
* @property {boolean} [routeToLeaderEnabled=True] If set to false leader aware routing will be disabled.
112
112
* Disabling leader aware routing would route all requests in RW/PDML transactions to any region.
113
+
* @property {google.spanner.v1.IDirectedReadOptions} [directedReadOptions] Sets the DirectedReadOptions for all ReadRequests and ExecuteSqlRequests for the Client.
114
+
* Indicates which replicas or regions should be used for non-transactional reads or queries.
115
+
* DirectedReadOptions won't be set for readWrite transactions"
0 commit comments