15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_CLIENT_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_SPANNER_CLIENT_H
18#include "google/cloud/spanner/batch_dml_result.h"
19#include "google/cloud/spanner/client_options.h"
20#include "google/cloud/spanner/commit_options.h"
21#include "google/cloud/spanner/commit_result.h"
22#include "google/cloud/spanner/connection.h"
23#include "google/cloud/spanner/connection_options.h"
24#include "google/cloud/spanner/database.h"
25#include "google/cloud/spanner/internal/defaults.h"
26#include "google/cloud/spanner/keys.h"
27#include "google/cloud/spanner/mutations.h"
28#include "google/cloud/spanner/partition_options.h"
29#include "google/cloud/spanner/query_options.h"
30#include "google/cloud/spanner/query_partition.h"
31#include "google/cloud/spanner/read_options.h"
32#include "google/cloud/spanner/read_partition.h"
33#include "google/cloud/spanner/results.h"
34#include "google/cloud/spanner/retry_policy.h"
35#include "google/cloud/spanner/session_pool_options.h"
36#include "google/cloud/spanner/sql_statement.h"
37#include "google/cloud/spanner/transaction.h"
38#include "google/cloud/spanner/version.h"
39#include "google/cloud/backoff_policy.h"
40#include "google/cloud/internal/non_constructible.h"
41#include "google/cloud/options.h"
42#include "google/cloud/status.h"
43#include "google/cloud/status_or.h"
44#include <google/spanner/v1/spanner.pb.h>
45#include <grpcpp/grpcpp.h>
47#include <initializer_list>
55GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
127
128
129
130
131
132
134 : conn_(std::move(conn)),
135 opts_(internal::MergeOptions(std::move(opts), conn_->
options())) {}
151 return a.conn_ == b.conn_;
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
181 std::vector<std::string> columns,
Options opts
= {});
184
185
186
187
188
190 std::string table,
KeySet keys,
191 std::vector<std::string> columns,
Options opts
= {});
194
195
196
197
199 std::vector<std::string> columns,
Options opts
= {});
202
203
204
205
206
207
208
209
210
211
212
213
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
249 std::vector<std::string> columns,
Options opts
= {});
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
296
297
298
299
300
305
306
307
308
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
362
363
364
365
366
372
373
374
375
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
548 std::function<StatusOr<Mutations>(
Transaction)>
const& mutator,
549 std::unique_ptr<TransactionRerunPolicy> rerun_policy,
550 std::unique_ptr<BackoffPolicy> backoff_policy,
Options opts
= {});
553
554
555
556
557
558
559
560
561
562
564 std::function<StatusOr<Mutations>(
Transaction)>
const& mutator,
568
569
570
571
572
573
574
575
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
638
639
640
641
642
643
644
645
646
647
648
649
650
651
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
683 std::initializer_list<internal::NonConstructible>)
690
691
692
694 std::vector<std::string> columns,
696 return Read(std::move(table)
, std::move(keys)
, std::move(columns)
,
700
701
702
704 std::vector<std::string> columns,
705 std::initializer_list<internal::NonConstructible>) {
706 return Read(std::move(table)
, std::move(keys)
, std::move(columns)
);
709
710
711
713 std::string table,
KeySet keys,
714 std::vector<std::string> columns,
716 return Read(std::move(transaction_options)
, std::move(table)
,
720
721
722
724 std::string table,
KeySet keys,
725 std::vector<std::string> columns,
726 std::initializer_list<internal::NonConstructible>) {
727 return Read(std::move(transaction_options)
, std::move(table)
,
728 std::move(keys)
, std::move(columns)
);
731
732
733
735 std::vector<std::string> columns,
737 return Read(std::move(transaction)
, std::move(table)
, std::move(keys)
,
741
742
743
745 std::vector<std::string> columns,
746 std::initializer_list<internal::NonConstructible>) {
747 return Read(std::move(transaction)
, std::move(table)
, std::move(keys)
,
755
756
757
760 std::vector<std::string> columns,
ReadOptions const& read_options,
763 std::move(keys)
, std::move(columns)
,
768
769
770
773 std::vector<std::string> columns,
774 std::initializer_list<internal::NonConstructible>) {
776 std::move(keys)
, std::move(columns)
);
783
784
785
790
791
792
794 std::initializer_list<internal::NonConstructible>) {
798
799
800
803 return ExecuteQuery(std::move(transaction_options)
, std::move(statement)
,
807
808
809
812 std::initializer_list<internal::NonConstructible>) {
813 return ExecuteQuery(std::move(transaction_options)
, std::move(statement)
);
816
817
818
825
826
827
829 std::initializer_list<internal::NonConstructible>) {
833
834
835
841
842
843
845 std::initializer_list<internal::NonConstructible>) {
853
854
855
861
862
863
866 std::initializer_list<internal::NonConstructible>) {
870
871
872
876 return ProfileQuery(std::move(transaction_options)
, std::move(statement)
,
880
881
882
885 std::initializer_list<internal::NonConstructible>) {
886 return ProfileQuery(std::move(transaction_options)
, std::move(statement)
);
889
890
891
899
900
901
904 std::initializer_list<internal::NonConstructible>) {
912
913
914
922
923
924
927 std::initializer_list<internal::NonConstructible>) {
935
936
937
941 return ExecuteDml(std::move(transaction)
, std::move(statement)
,
945
946
947
950 std::initializer_list<internal::NonConstructible>) {
951 return ExecuteDml(std::move(transaction)
, std::move(statement)
);
960 return ProfileDml(std::move(transaction)
, std::move(statement)
,
965 std::initializer_list<internal::NonConstructible>) {
966 return ProfileDml(std::move(transaction)
, std::move(statement)
);
973
974
975
979 return AnalyzeSql(std::move(transaction)
, std::move(statement)
,
983
984
985
988 std::initializer_list<internal::NonConstructible>) {
989 return AnalyzeSql(std::move(transaction)
, std::move(statement)
);
996
997
998
1000 std::function<StatusOr<Mutations>(
Transaction)>
const& mutator,
1001 std::unique_ptr<TransactionRerunPolicy> rerun_policy,
1002 std::unique_ptr<BackoffPolicy> backoff_policy,
1004 return Commit(mutator
, std::move(rerun_policy)
, std::move(backoff_policy)
,
1008
1009
1010
1012 std::function<StatusOr<Mutations>(
Transaction)>
const& mutator,
1013 std::unique_ptr<TransactionRerunPolicy> rerun_policy,
1014 std::unique_ptr<BackoffPolicy> backoff_policy,
1015 std::initializer_list<internal::NonConstructible>) {
1016 return Commit(mutator
, std::move(rerun_policy)
, std::move(backoff_policy)
);
1023
1024
1026 std::function<StatusOr<Mutations>(
Transaction)>
const& mutator,
1031
1032
1034 std::function<StatusOr<Mutations>(
Transaction)>
const& mutator,
1035 std::initializer_list<internal::NonConstructible>) {
1043
1044
1045
1051
1052
1053
1055 Mutations mutations, std::initializer_list<internal::NonConstructible>) {
1056 return Commit(std::move(mutations)
);
1063
1064
1065
1068 return Commit(std::move(transaction)
, std::move(mutations)
,
1072
1073
1074
1077 std::initializer_list<internal::NonConstructible>) {
1078 return Commit(std::move(transaction)
, std::move(mutations)
);
1085
1086
1087
1093
1094
1095
1098 std::initializer_list<internal::NonConstructible>) {
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1154 Database const& db, ConnectionOptions
const& connection_options,
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1173 Database const& db, ConnectionOptions
const& connection_options,
1175 std::unique_ptr<RetryPolicy> retry_policy,
1176 std::unique_ptr<BackoffPolicy> backoff_policy);
1178GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
ClientOptions allows the caller to set a variety of options when constructing a Client instance.
Definition: client_options.h:31
Performs database client operations on Spanner.
Definition: client.h:124
StatusOr< PartitionedDmlResult > ExecutePartitionedDml(SqlStatement statement, std::initializer_list< internal::NonConstructible >)
Executes a Partitioned DML SQL query.
Definition: client.h:1096
ProfileQueryResult ProfileQuery(Transaction::SingleUseOptions transaction_options, SqlStatement statement, QueryOptions const &opts)
Profiles a SQL query.
Definition: client.h:873
StatusOr< std::vector< ReadPartition > > PartitionRead(Transaction transaction, std::string table, KeySet keys, std::vector< std::string > columns, Options opts={})
Creates a set of partitions that can be used to execute a read operation in parallel.
ProfileQueryResult ProfileQuery(Transaction transaction, SqlStatement statement, std::initializer_list< internal::NonConstructible >)
Profiles a SQL query.
Definition: client.h:902
StatusOr< PartitionedDmlResult > ExecutePartitionedDml(SqlStatement statement, Options opts={})
Executes a Partitioned DML SQL query.
StatusOr< ProfileDmlResult > ProfileDml(Transaction transaction, SqlStatement statement, QueryOptions const &opts)
Executes a SQL query.
Definition: client.h:957
StatusOr< CommitResult > Commit(std::function< StatusOr< Mutations >(Transaction)> const &mutator, std::unique_ptr< TransactionRerunPolicy > rerun_policy, std::unique_ptr< BackoffPolicy > backoff_policy, CommitOptions const &commit_options)
Commits a read-write transaction.
Definition: client.h:999
RowStream ExecuteQuery(Transaction::SingleUseOptions transaction_options, SqlStatement statement, Options opts={})
Executes a SQL query.
StatusOr< DmlResult > ExecuteDml(Transaction transaction, SqlStatement statement, QueryOptions const &opts)
Executes a SQL DML statement.
Definition: client.h:938
RowStream Read(std::string table, KeySet keys, std::vector< std::string > columns, Options opts={})
Reads rows from the database using key lookups and scans, as a simple key/value style alternative to ...
ProfileQueryResult ProfileQuery(Transaction::SingleUseOptions transaction_options, SqlStatement statement, Options opts={})
Profiles a SQL query.
StatusOr< CommitResult > Commit(std::function< StatusOr< Mutations >(Transaction)> const &mutator, CommitOptions const &commit_options)
Commits a read-write transaction.
Definition: client.h:1025
RowStream Read(Transaction::SingleUseOptions transaction_options, std::string table, KeySet keys, std::vector< std::string > columns, ReadOptions const &read_options)
Reads rows from the database using key lookups and scans, as a simple key/value style alternative to ...
Definition: client.h:712
friend bool operator!=(Client const &a, Client const &b)
Definition: client.h:153
RowStream ExecuteQuery(SqlStatement statement, std::initializer_list< internal::NonConstructible >)
Executes a SQL query.
Definition: client.h:793
StatusOr< BatchDmlResult > ExecuteBatchDml(Transaction transaction, std::vector< SqlStatement > statements, Options opts={})
Executes a batch of SQL DML statements.
StatusOr< std::vector< ReadPartition > > PartitionRead(Transaction transaction, std::string table, KeySet keys, std::vector< std::string > columns, std::initializer_list< internal::NonConstructible >)
Creates a set of partitions that can be used to execute a read operation in parallel.
Definition: client.h:771
Status Rollback(Transaction transaction, Options opts={})
Rolls back a read-write transaction, releasing any locks it holds.
StatusOr< CommitResult > Commit(std::function< StatusOr< Mutations >(Transaction)> const &mutator, std::unique_ptr< TransactionRerunPolicy > rerun_policy, std::unique_ptr< BackoffPolicy > backoff_policy, std::initializer_list< internal::NonConstructible >)
Commits a read-write transaction.
Definition: client.h:1011
RowStream Read(Transaction::SingleUseOptions transaction_options, std::string table, KeySet keys, std::vector< std::string > columns, Options opts={})
Reads rows from the database using key lookups and scans, as a simple key/value style alternative to ...
RowStream Read(Transaction::SingleUseOptions transaction_options, std::string table, KeySet keys, std::vector< std::string > columns, std::initializer_list< internal::NonConstructible >)
Reads rows from the database using key lookups and scans, as a simple key/value style alternative to ...
Definition: client.h:723
ProfileQueryResult ProfileQuery(Transaction transaction, SqlStatement statement, QueryOptions const &opts)
Profiles a SQL query.
Definition: client.h:892
RowStream ExecuteQuery(Transaction transaction, SqlStatement statement, QueryOptions const &opts)
Executes a SQL query.
Definition: client.h:819
StatusOr< std::vector< QueryPartition > > PartitionQuery(Transaction transaction, SqlStatement statement, std::initializer_list< internal::NonConstructible >)
Creates a set of partitions that can be used to execute a query operation in parallel.
Definition: client.h:925
StatusOr< CommitResult > Commit(Mutations mutations, CommitOptions const &commit_options)
Commits the mutations, using the options, atomically in order.
Definition: client.h:1046
StatusOr< CommitResult > CommitAtLeastOnce(Transaction::ReadWriteOptions transaction_options, Mutations mutations, Options opts={})
Commits a write transaction with at-least-once semantics.
StatusOr< CommitResult > Commit(Transaction transaction, Mutations mutations, CommitOptions const &commit_options)
Commits a read-write transaction.
Definition: client.h:1066
ProfileQueryResult ProfileQuery(Transaction transaction, SqlStatement statement, Options opts={})
Profiles a SQL query.
Client(Client const &)=default
StatusOr< std::vector< QueryPartition > > PartitionQuery(Transaction transaction, SqlStatement statement, Options opts=Options{})
Creates a set of partitions that can be used to execute a query operation in parallel.
StatusOr< ProfileDmlResult > ProfileDml(Transaction transaction, SqlStatement statement, Options opts={})
Profiles a SQL DML statement.
StatusOr< CommitResult > Commit(Transaction transaction, Mutations mutations, std::initializer_list< internal::NonConstructible >)
Commits a read-write transaction.
Definition: client.h:1075
StatusOr< PartitionedDmlResult > ExecutePartitionedDml(SqlStatement statement, QueryOptions const &opts)
Executes a Partitioned DML SQL query.
Definition: client.h:1088
ProfileQueryResult ProfileQuery(Transaction::SingleUseOptions transaction_options, SqlStatement statement, std::initializer_list< internal::NonConstructible >)
Profiles a SQL query.
Definition: client.h:883
StatusOr< CommitResult > Commit(std::function< StatusOr< Mutations >(Transaction)> const &mutator, std::initializer_list< internal::NonConstructible >)
Definition: client.h:1033
RowStream ExecuteQuery(Transaction transaction, SqlStatement statement, Options opts={})
Executes a SQL query.
RowStream ExecuteQuery(QueryPartition const &partition, QueryOptions const &opts)
Executes a SQL query on a subset of rows in a database.
Definition: client.h:836
StatusOr< ExecutionPlan > AnalyzeSql(Transaction transaction, SqlStatement statement, QueryOptions const &opts)
Analyzes the execution plan of a SQL statement.
Definition: client.h:976
RowStream Read(ReadPartition const &partition, Options opts={})
Reads rows from a subset of rows in a database.
RowStream Read(std::string table, KeySet keys, std::vector< std::string > columns, ReadOptions const &read_options)
Reads rows from the database using key lookups and scans, as a simple key/value style alternative to ...
Definition: client.h:693
ProfileQueryResult ProfileQuery(SqlStatement statement, QueryOptions const &opts)
Profiles a SQL query.
Definition: client.h:856
ProfileQueryResult ProfileQuery(SqlStatement statement, std::initializer_list< internal::NonConstructible >)
Profiles a SQL query.
Definition: client.h:864
RowStream ExecuteQuery(SqlStatement statement, Options opts={})
Executes a SQL query.
StatusOr< CommitResult > Commit(Mutations mutations, Options opts={})
Commits the mutations, using the options, atomically in order.
RowStream ExecuteQuery(Transaction transaction, SqlStatement statement, std::initializer_list< internal::NonConstructible >)
Executes a SQL query.
Definition: client.h:828
friend bool operator==(Client const &a, Client const &b)
Definition: client.h:150
StatusOr< CommitResult > Commit(Mutations mutations, std::initializer_list< internal::NonConstructible >)
Commits the mutations, using the options, atomically in order.
Definition: client.h:1054
StatusOr< CommitResult > Commit(std::function< StatusOr< Mutations >(Transaction)> const &mutator, Options opts={})
Commits a read-write transaction.
RowStream ExecuteQuery(Transaction::SingleUseOptions transaction_options, SqlStatement statement, std::initializer_list< internal::NonConstructible >)
Executes a SQL query.
Definition: client.h:810
Client()=delete
No default construction.
RowStream Read(Transaction transaction, std::string table, KeySet keys, std::vector< std::string > columns, Options opts={})
Reads rows from the database using key lookups and scans, as a simple key/value style alternative to ...
Client(Client &&)=default
RowStream Read(std::string table, KeySet keys, std::vector< std::string > columns, std::initializer_list< internal::NonConstructible >)
Reads rows from the database using key lookups and scans, as a simple key/value style alternative to ...
Definition: client.h:703
RowStream ExecuteQuery(SqlStatement statement, QueryOptions const &opts)
Executes a SQL query.
Definition: client.h:786
ProfileQueryResult ProfileQuery(SqlStatement statement, Options opts={})
Profiles a SQL query.
StatusOr< ProfileDmlResult > ProfileDml(Transaction transaction, SqlStatement statement, std::initializer_list< internal::NonConstructible >)
Executes a SQL query.
Definition: client.h:963
RowStream ExecuteQuery(QueryPartition const &partition, std::initializer_list< internal::NonConstructible >)
Executes a SQL query on a subset of rows in a database.
Definition: client.h:844
RowStream Read(Transaction transaction, std::string table, KeySet keys, std::vector< std::string > columns, std::initializer_list< internal::NonConstructible >)
Reads rows from the database using key lookups and scans, as a simple key/value style alternative to ...
Definition: client.h:744
StatusOr< DmlResult > ExecuteDml(Transaction transaction, SqlStatement statement, std::initializer_list< internal::NonConstructible >)
Executes a SQL DML statement.
Definition: client.h:948
Client & operator=(Client &&)=default
StatusOr< std::vector< QueryPartition > > PartitionQuery(Transaction transaction, SqlStatement statement, PartitionOptions const &partition_options)
Creates a set of partitions that can be used to execute a query operation in parallel.
Definition: client.h:915
StatusOr< ExecutionPlan > AnalyzeSql(Transaction transaction, SqlStatement statement, std::initializer_list< internal::NonConstructible >)
Analyzes the execution plan of a SQL statement.
Definition: client.h:986
StatusOr< CommitResult > Commit(Transaction transaction, Mutations mutations, Options opts={})
Commits a read-write transaction.
StatusOr< std::vector< ReadPartition > > PartitionRead(Transaction transaction, std::string table, KeySet keys, std::vector< std::string > columns, ReadOptions const &read_options, PartitionOptions const &partition_options)
Creates a set of partitions that can be used to execute a read operation in parallel.
Definition: client.h:758
StatusOr< ExecutionPlan > AnalyzeSql(Transaction transaction, SqlStatement statement, Options opts={})
Analyzes the execution plan of a SQL statement.
Client(std::shared_ptr< Connection > conn, Options opts={})
Constructs a Client object using the specified conn and opts.
Definition: client.h:133
StatusOr< CommitResult > Commit(std::function< StatusOr< Mutations >(Transaction)> const &mutator, std::unique_ptr< TransactionRerunPolicy > rerun_policy, std::unique_ptr< BackoffPolicy > backoff_policy, Options opts={})
Commits a read-write transaction.
RowStream Read(Transaction transaction, std::string table, KeySet keys, std::vector< std::string > columns, ReadOptions const &read_options)
Reads rows from the database using key lookups and scans, as a simple key/value style alternative to ...
Definition: client.h:734
Client & operator=(Client const &)=default
RowStream ExecuteQuery(QueryPartition const &partition, Options opts={})
Executes a SQL query on a subset of rows in a database.
StatusOr< DmlResult > ExecuteDml(Transaction transaction, SqlStatement statement, Options opts={})
Executes a SQL DML statement.
Client(std::shared_ptr< Connection > conn, std::initializer_list< internal::NonConstructible >)
Definition: client.h:682
RowStream ExecuteQuery(Transaction::SingleUseOptions transaction_options, SqlStatement statement, QueryOptions const &opts)
Executes a SQL query.
Definition: client.h:801
Client(std::shared_ptr< Connection > conn, ClientOptions const &opts)
Definition: client.h:680
Set options on calls to spanner::Client::Commit().
Definition: commit_options.h:35
A connection to a Spanner database instance.
Definition: connection.h:59
virtual Options options()
Returns the options used by the Connection.
Definition: connection.h:134
This class identifies a Cloud Spanner Database.
Definition: database.h:43
Represents the result of a data modifying operation using spanner::Client::ExecuteDml().
Definition: results.h:146
The KeySet class is a regular type that represents a collection of Keys.
Definition: keys.h:157
Represents the result and profile stats of a data modifying operation using spanner::Client::ProfileD...
Definition: results.h:244
Represents the stream of Rows and profile stats returned from spanner::Client::ProfileQuery().
Definition: results.h:186
These QueryOptions allow users to configure features about how their SQL queries executes on the serv...
Definition: query_options.h:37
The QueryPartition class is a regular type that represents a single slice of a parallel SQL read.
Definition: query_partition.h:89
The ReadPartition class is a regular type that represents a single slice of a parallel Read operation...
Definition: read_partition.h:90
Represents the stream of Rows returned from spanner::Client::Read() or spanner::Client::ExecuteQuery(...
Definition: results.h:101
Controls the session pool maintained by a spanner::Client.
Definition: session_pool_options.h:60
SessionPoolOptions()
Definition: session_pool_options.h:62
Represents a potentially parameterized SQL statement.
Definition: sql_statement.h:51
Options for ReadWrite transactions.
Definition: transaction.h:84
Options for "single-use", ReadOnly transactions, where Spanner chooses the read timestamp,...
Definition: transaction.h:108
The representation of a Cloud Spanner transaction.
Definition: transaction.h:58
Contains all the Cloud Spanner C++ client types and functions.
Definition: backoff_policy.h:23
Options ToOptions(PartitionOptions const &)
Converts PartitionOptions to common Options.
std::shared_ptr< Connection > MakeConnection(Database const &db, ConnectionOptions const &connection_options, SessionPoolOptions session_pool_options, std::unique_ptr< RetryPolicy > retry_policy, std::unique_ptr< BackoffPolicy > backoff_policy)
Returns a Connection object that can be used for interacting with Spanner.
Options ToOptions(ReadOptions const &)
Converts ReadOptions to common Options.
std::shared_ptr< Connection > MakeConnection(Database const &db, ConnectionOptions const &connection_options, SessionPoolOptions session_pool_options=SessionPoolOptions())
Returns a Connection object that can be used for interacting with Spanner.
std::shared_ptr< spanner::Connection > MakeConnection(spanner::Database const &db, Options opts={})
Returns a Connection object that can be used for interacting with Spanner.
The result of executing a batch of DML statements.
Definition: batch_dml_result.h:39
The result of committing a Transaction.
Definition: commit_result.h:38
Options passed to Client::PartitionRead or Client::PartitionQuery.
Definition: partition_options.h:38
The result of executing a Partitioned DML query.
Definition: partitioned_dml_result.h:29
Options passed to Client::Read or Client::PartitionRead.
Definition: read_options.h:32