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

Function parsePriority

statement.go:1190–1201  ·  view source on GitHub ↗
(priority string)

Source from the content-addressed store, hash-verified

1188}
1189
1190func parsePriority(priority string) (pb.RequestOptions_Priority, error) {
1191 switch strings.ToUpper(priority) {
1192 case "HIGH":
1193 return pb.RequestOptions_PRIORITY_HIGH, nil
1194 case "MEDIUM":
1195 return pb.RequestOptions_PRIORITY_MEDIUM, nil
1196 case "LOW":
1197 return pb.RequestOptions_PRIORITY_LOW, nil
1198 default:
1199 return pb.RequestOptions_PRIORITY_UNSPECIFIED, fmt.Errorf("invalid priority: %q", priority)
1200 }
1201}
1202
1203func parseIsolationLevel(isolationLevel string) (pb.TransactionOptions_IsolationLevel, error) {
1204 switch strings.ToUpper(isolationLevel) {

Callers 3

newBeginRwStatementFunction · 0.85
newBeginRoStatementFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected