@@ -249,15 +249,8 @@ class Client {
249
249
std::vector<std::string> columns, Options opts = {});
250
250
251
251
/* *
252
- * Executes a SQL query.
253
- *
254
- * Operations inside read-write transactions might return `ABORTED`. If this
255
- * occurs, the application should restart the transaction from the beginning.
256
- *
257
- * Callers can optionally supply a `Transaction` or
258
- * `Transaction::SingleUseOptions` used to create a single-use transaction -
259
- * or neither, in which case a single-use transaction with default options
260
- * is used.
252
+ * Executes a SQL query in a single-use transaction created with the
253
+ * default options.
261
254
*
262
255
* `SELECT * ...` queries are supported, but there's no guarantee about the
263
256
* order, nor number, of returned columns. Therefore, the caller must look up
@@ -267,9 +260,6 @@ class Client {
267
260
* returned/ignored, and the column order is known. This enables more
268
261
* efficient and simpler code.
269
262
*
270
- * Can also execute a DML statement with a returning clause in a read/write
271
- * transaction.
272
- *
273
263
* @note No individual row in the `RowStream` can exceed 100 MiB, and no
274
264
* column value can exceed 10 MiB.
275
265
*
@@ -281,10 +271,6 @@ class Client {
281
271
* Using `SELECT *`.
282
272
* @snippet samples.cc spanner-query-data-select-star
283
273
*
284
- * @par Example
285
- * Using a DML statement with `THEN RETURN`.
286
- * @snippet samples.cc spanner-update-dml-returning
287
- *
288
274
* @param statement The SQL statement to execute.
289
275
* @param opts (optional) The `Options` to use for this call. If given,
290
276
* these will take precedence over the options set at the client and
@@ -293,18 +279,37 @@ class Client {
293
279
RowStream ExecuteQuery (SqlStatement statement, Options opts = {});
294
280
295
281
/* *
296
- * @copydoc ExecuteQuery(SqlStatement, Options)
282
+ * Executes a SQL query in a single-use transaction created with the
283
+ * @p transaction_options.
297
284
*
298
285
* @param transaction_options Execute this query in a single-use transaction
299
286
* with these options.
287
+ * @param statement The SQL statement to execute.
288
+ * @param opts (optional) The `Options` to use for this call. If given,
289
+ * these will take precedence over the options set at the client and
290
+ * environment levels.
300
291
*/
301
292
RowStream ExecuteQuery (Transaction::SingleUseOptions transaction_options,
302
293
SqlStatement statement, Options opts = {});
303
294
304
295
/* *
305
- * @copydoc ExecuteQuery(SqlStatement, Options)
296
+ * Executes a SQL query in an existing transaction.
297
+ *
298
+ * Operations inside read-write transactions might return `ABORTED`. If this
299
+ * occurs, the application should restart the transaction from the beginning.
300
+ *
301
+ * Can execute a DML statement with a returning clause in a read/write
302
+ * transaction.
303
+ *
304
+ * @par Example
305
+ * Using a DML statement with `THEN RETURN`.
306
+ * @snippet samples.cc spanner-update-dml-returning
306
307
*
307
308
* @param transaction Execute this query as part of an existing transaction.
309
+ * @param statement The SQL statement to execute.
310
+ * @param opts (optional) The `Options` to use for this call. If given,
311
+ * these will take precedence over the options set at the client and
312
+ * environment levels.
308
313
*/
309
314
RowStream ExecuteQuery (Transaction transaction, SqlStatement statement,
310
315
Options opts = {});
0 commit comments