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

Method convertCreate_view_stmtContext

internal/engine/sqlite/convert.go:174–193  ·  view source on GitHub ↗
(n *parser.Create_view_stmtContext)

Source from the content-addressed store, hash-verified

172}
173
174func (c *cc) convertCreate_view_stmtContext(n *parser.Create_view_stmtContext) ast.Node {
175 viewName := n.View_name().GetText()
176 relation := &ast.RangeVar{
177 Relname: &viewName,
178 }
179
180 if n.Schema_name() != nil {
181 schemaName := n.Schema_name().GetText()
182 relation.Schemaname = &schemaName
183 }
184
185 return &ast.ViewStmt{
186 View: relation,
187 Aliases: &ast.List{},
188 Query: c.convert(n.Select_stmt()),
189 Replace: false,
190 Options: &ast.List{},
191 WithCheckOption: ast.ViewCheckOption(0),
192 }
193}
194
195type Delete_stmt interface {
196 node

Callers 1

convertMethod · 0.95

Calls 6

convertMethod · 0.95
ViewCheckOptionTypeAlias · 0.92
GetTextMethod · 0.80
View_nameMethod · 0.65
Schema_nameMethod · 0.65
Select_stmtMethod · 0.65

Tested by

no test coverage detected