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

Function toList

internal/engine/dolphin/utils.go:17–29  ·  view source on GitHub ↗
(node pcast.Node)

Source from the content-addressed store, hash-verified

15}
16
17func toList(node pcast.Node) *ast.List {
18 var items []ast.Node
19 switch n := node.(type) {
20 case *pcast.TableName:
21 if schema := n.Schema.String(); schema != "" {
22 items = append(items, NewIdentifier(schema))
23 }
24 items = append(items, NewIdentifier(n.Name.String()))
25 default:
26 return nil
27 }
28 return &ast.List{Items: items}
29}
30
31func isNotNull(n *pcast.ColumnDef) bool {
32 for i := range n.Options {

Callers 1

Calls 2

NewIdentifierFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected