(_ context.Context, query string, _ ...any)
| 1532 | execContextQueries []string |
| 1533 | noopProfiling |
| 1534 | execQueries []string |
| 1535 | } |
| 1536 | |
| 1537 | func (e *abortedAlterViewRecoveryExecutor) QueryContext(context.Context, string, ...any) (RowSet, error) { |
| 1538 | return nil, errors.New("not implemented") |
| 1539 | } |
| 1540 | |
| 1541 | func (e *abortedAlterViewRecoveryExecutor) ExecContext(_ context.Context, query string, _ ...any) (ExecResult, error) { |
| 1542 | e.execContextQueries = append(e.execContextQueries, query) |
| 1543 | switch strings.TrimSpace(strings.ToUpper(query)) { |
| 1544 | case "ROLLBACK": |
| 1545 | return &fakeExecResult{}, nil |
| 1546 | case "ALTER TABLE SOME_VIEW RENAME TO RENAMED_VIEW": |
| 1547 | // Count attempts explicitly: statements and ROLLBACK now share |
| 1548 | // ExecContext, so a positional index is no longer a reliable |
| 1549 | // first-attempt signal. |
| 1550 | e.alterAttempts++ |
| 1551 | if e.alterAttempts == 1 { |
| 1552 | return nil, errors.New("TransactionContext Error: Current transaction is aborted (please ROLLBACK)") |
nothing calls this directly
no outgoing calls
no test coverage detected