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

Method convertSelectField

internal/engine/dolphin/convert.go:543–561  ·  view source on GitHub ↗
(n *pcast.SelectField)

Source from the content-addressed store, hash-verified

541}
542
543func (c *cc) convertSelectField(n *pcast.SelectField) *ast.ResTarget {
544 var val ast.Node
545 if n.WildCard != nil {
546 val = c.convertWildCardField(n.WildCard)
547 } else {
548 val = c.convert(n.Expr)
549 }
550 var name *string
551 if n.AsName.O != "" {
552 asname := identifier(n.AsName.O)
553 name = &asname
554 }
555 return &ast.ResTarget{
556 // TODO: Populate Indirection field
557 Name: name,
558 Val: val,
559 Location: n.Offset,
560 }
561}
562
563func (c *cc) convertSelectStmt(n *pcast.SelectStmt) *ast.SelectStmt {
564 windowClause := &ast.List{Items: make([]ast.Node, 0)}

Callers 2

convertFieldListMethod · 0.95
convertMethod · 0.95

Calls 3

convertWildCardFieldMethod · 0.95
convertMethod · 0.95
identifierFunction · 0.70

Tested by

no test coverage detected