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

Method getSchema

internal/sql/catalog/schema.go:89–96  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

87}
88
89func (c *Catalog) getSchema(name string) (*Schema, error) {
90 for i := range c.Schemas {
91 if c.Schemas[i].Name == name {
92 return c.Schemas[i], nil
93 }
94 }
95 return nil, sqlerr.SchemaNotFound(name)
96}
97
98func (c *Catalog) createSchema(stmt *ast.CreateSchemaStmt) error {
99 if stmt.Name == nil {

Callers 15

createSchemaMethod · 0.95
alterTableSetSchemaMethod · 0.95
createTableMethod · 0.95
dropTableMethod · 0.95
createTableAsMethod · 0.95
ListFuncsByNameMethod · 0.95
createEnumMethod · 0.95
getTypeMethod · 0.95
createCompositeTypeMethod · 0.95
alterTypeRenameValueMethod · 0.95
alterTypeAddValueMethod · 0.95
alterTypeSetSchemaMethod · 0.95

Calls 1

SchemaNotFoundFunction · 0.92

Tested by

no test coverage detected