RunQueryWithStats executes a statement with stats either on the running transaction or on the temporal read-only transaction. It returns row iterator and read-only transaction if the statement was executed on the read-only transaction.
(ctx context.Context, stmt spanner.Statement)
| 229 | // RunQueryWithStats executes a statement with stats either on the running transaction or on the temporal read-only transaction. |
| 230 | // It returns row iterator and read-only transaction if the statement was executed on the read-only transaction. |
| 231 | func (s *Session) RunQueryWithStats(ctx context.Context, stmt spanner.Statement) (*spanner.RowIterator, *spanner.ReadOnlyTransaction) { |
| 232 | mode := pb.ExecuteSqlRequest_PROFILE |
| 233 | opts := spanner.QueryOptions{ |
| 234 | Mode: &mode, |
| 235 | Priority: s.currentPriority(), |
| 236 | } |
| 237 | return s.runQueryWithOptions(ctx, stmt, opts) |
| 238 | } |
| 239 | |
| 240 | // RunQuery executes a statement either on the running transaction or on the temporal read-only transaction. |
| 241 | // It returns row iterator and read-only transaction if the statement was executed on the read-only transaction. |