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

Method commentOnTable

internal/sql/catalog/comment_on.go:39–50  ·  view source on GitHub ↗
(stmt *ast.CommentOnTableStmt)

Source from the content-addressed store, hash-verified

37}
38
39func (c *Catalog) commentOnTable(stmt *ast.CommentOnTableStmt) error {
40 _, t, err := c.getTable(stmt.Table)
41 if err != nil {
42 return err
43 }
44 if stmt.Comment != nil {
45 t.Comment = *stmt.Comment
46 } else {
47 t.Comment = ""
48 }
49 return nil
50}
51
52func (c *Catalog) commentOnType(stmt *ast.CommentOnTypeStmt) error {
53 t, _, err := c.getType(stmt.Type)

Callers 1

UpdateMethod · 0.95

Calls 1

getTableMethod · 0.95

Tested by

no test coverage detected