MCPcopy Index your code
hub / github.com/sqlc-dev/sqlc / commentOnSchema

Method commentOnSchema

internal/sql/catalog/comment_on.go:26–37  ·  view source on GitHub ↗
(stmt *ast.CommentOnSchemaStmt)

Source from the content-addressed store, hash-verified

24}
25
26func (c *Catalog) commentOnSchema(stmt *ast.CommentOnSchemaStmt) error {
27 s, err := c.getSchema(stmt.Schema.Str)
28 if err != nil {
29 return err
30 }
31 if stmt.Comment != nil {
32 s.Comment = *stmt.Comment
33 } else {
34 s.Comment = ""
35 }
36 return nil
37}
38
39func (c *Catalog) commentOnTable(stmt *ast.CommentOnTableStmt) error {
40 _, t, err := c.getTable(stmt.Table)

Callers 1

UpdateMethod · 0.95

Calls 1

getSchemaMethod · 0.95

Tested by

no test coverage detected