MCPcopy Index your code
hub / github.com/cloudspannerecosystem/spanner-cli / RunQueryWithStats

Method RunQueryWithStats

session.go:231–238  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
231func (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.

Callers 4

TestRequestPriorityFunction · 0.95
ExecuteMethod · 0.80
ExecuteMethod · 0.80
ExecuteMethod · 0.80

Calls 2

currentPriorityMethod · 0.95
runQueryWithOptionsMethod · 0.95

Tested by 1

TestRequestPriorityFunction · 0.76