MCPcopy Create free account
hub / github.com/PostHog/duckgres / execResult

Method execResult

server/conn_test.go:1479–1494  ·  view source on GitHub ↗
(query string, callIndex int)

Source from the content-addressed store, hash-verified

1477 execCalls []string
1478 execCtxCalls []string
1479}
1480
1481func (e *abortedExecAlterViewRecoveryExecutor) execResult(query string, _ int) (ExecResult, error) {
1482 trimmed := strings.TrimSpace(query)
1483 switch trimmed {
1484 case "ROLLBACK":
1485 return &fakeExecResult{}, nil
1486 case e.originalQuery:
1487 // Count attempts explicitly: statement execution and ROLLBACK now share
1488 // ExecContext, so a positional index over the recorded calls is no longer
1489 // a reliable way to tell the first attempt from the retry.
1490 e.originalAttempts++
1491 if e.originalAttempts == 1 {
1492 return nil, errors.New("TransactionContext Error: Current transaction is aborted (please ROLLBACK)")
1493 }
1494 return nil, errors.New("Binder Error: cannot use alter table on a view because this object is not a table; use ALTER VIEW instead")
1495 case e.rewritten:
1496 return &fakeExecResult{}, nil
1497 default:

Callers 2

ExecContextMethod · 0.95
ExecMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected