(input string)
| 997 | } |
| 998 | |
| 999 | func newBeginRwStatement(input string) (*BeginRwStatement, error) { |
| 1000 | matched := beginRwRe.FindStringSubmatch(input) |
| 1001 | stmt := &BeginRwStatement{} |
| 1002 | |
| 1003 | if matched[1] != "" { |
| 1004 | isolationLevel, err := parseIsolationLevel(matched[1]) |
| 1005 | if err != nil { |
| 1006 | return nil, err |
| 1007 | } |
| 1008 | stmt.IsolationLevel = isolationLevel |
| 1009 | } |
| 1010 | |
| 1011 | if matched[2] != "" { |
| 1012 | priority, err := parsePriority(matched[2]) |
| 1013 | if err != nil { |
| 1014 | return nil, err |
| 1015 | } |
| 1016 | stmt.Priority = priority |
| 1017 | } |
| 1018 | |
| 1019 | if matched[3] != "" { |
| 1020 | stmt.Tag = matched[3] |
| 1021 | } |
| 1022 | |
| 1023 | return stmt, nil |
| 1024 | } |
| 1025 | |
| 1026 | func (s *BeginRwStatement) Execute(ctx context.Context, session *Session) (*Result, error) { |
| 1027 | if session.InReadWriteTransaction() { |
no test coverage detected