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

Method Exec

server/conn_test.go:1555–1568  ·  view source on GitHub ↗
(query string, _ ...any)

Source from the content-addressed store, hash-verified

1553 }
1554 return nil, errors.New("Binder Error: Cannot use ALTER TABLE statement on object \"some_view\" because it is not a table")
1555 case "ALTER VIEW SOME_VIEW RENAME TO RENAMED_VIEW":
1556 return &fakeExecResult{rowsAffected: 1}, nil
1557 default:
1558 return nil, fmt.Errorf("unexpected ExecContext query %q", query)
1559 }
1560}
1561
1562func (e *abortedAlterViewRecoveryExecutor) Query(string, ...any) (RowSet, error) {
1563 return nil, errors.New("not implemented")
1564}
1565
1566func (e *abortedAlterViewRecoveryExecutor) Exec(query string, _ ...any) (ExecResult, error) {
1567 e.execQueries = append(e.execQueries, query)
1568 switch strings.TrimSpace(strings.ToUpper(query)) {
1569 case "ALTER TABLE SOME_VIEW RENAME TO RENAMED_VIEW":
1570 if len(e.execQueries) == 1 {
1571 return nil, errors.New("TransactionContext Error: Current transaction is aborted (please ROLLBACK)")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected