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

Function parseIsolationLevel

statement.go:1203–1212  ·  view source on GitHub ↗
(isolationLevel string)

Source from the content-addressed store, hash-verified

1201}
1202
1203func parseIsolationLevel(isolationLevel string) (pb.TransactionOptions_IsolationLevel, error) {
1204 switch strings.ToUpper(isolationLevel) {
1205 case "SERIALIZABLE":
1206 return pb.TransactionOptions_SERIALIZABLE, nil
1207 case "REPEATABLE READ":
1208 return pb.TransactionOptions_REPEATABLE_READ, nil
1209 default:
1210 return pb.TransactionOptions_ISOLATION_LEVEL_UNSPECIFIED, fmt.Errorf("invalid isolation level: %q", isolationLevel)
1211 }
1212}

Callers 1

newBeginRwStatementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected