MCPcopy Create free account
hub / github.com/cloudspannerecosystem/spanner-cli / RunQuery

Method RunQuery

session.go:242–247  ·  view source on GitHub ↗

RunQuery executes a statement 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

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.
242func (s *Session) RunQuery(ctx context.Context, stmt spanner.Statement) (*spanner.RowIterator, *spanner.ReadOnlyTransaction) {
243 opts := spanner.QueryOptions{
244 Priority: s.currentPriority(),
245 }
246 return s.runQueryWithOptions(ctx, stmt, opts)
247}
248
249// RunAnalyzeQuery analyzes a statement either on the running transaction or on the temporal read-only transaction.
250func (s *Session) RunAnalyzeQuery(ctx context.Context, stmt spanner.Statement) (*pb.QueryPlan, *pb.ResultSetMetadata, error) {

Callers 5

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

Calls 2

currentPriorityMethod · 0.95
runQueryWithOptionsMethod · 0.95

Tested by 2

TestRequestPriorityFunction · 0.76
TestIsolationLevelFunction · 0.76