MCPcopy
hub / github.com/sqlc-dev/sqlc / checkMissing

Function checkMissing

internal/sql/catalog/table.go:21–29  ·  view source on GitHub ↗
(err error, missingOK bool)

Source from the content-addressed store, hash-verified

19}
20
21func checkMissing(err error, missingOK bool) error {
22 var serr *sqlerr.Error
23 if errors.As(err, &serr) {
24 if serr.Err == sqlerr.NotFound && missingOK {
25 return nil
26 }
27 }
28 return err
29}
30
31func (table *Table) isExistColumn(cmd *ast.AlterTableCmd) (int, error) {
32 for i, c := range table.Columns {

Callers 4

alterTableMethod · 0.85
alterTableSetSchemaMethod · 0.85
renameColumnMethod · 0.85
renameTableMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected