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

Function New

internal/x/expander/expander.go:33–39  ·  view source on GitHub ↗

New creates a new Expander with the given column getter, parser, and dialect.

(colGetter ColumnGetter, parser Parser, dialect format.Dialect)

Source from the content-addressed store, hash-verified

31
32// New creates a new Expander with the given column getter, parser, and dialect.
33func New(colGetter ColumnGetter, parser Parser, dialect format.Dialect) *Expander {
34 return &Expander{
35 colGetter: colGetter,
36 parser: parser,
37 dialect: dialect,
38 }
39}
40
41// Expand takes a SQL query, and if it contains * in SELECT or RETURNING clause,
42// expands it to use explicit column names. Returns the expanded query string.

Callers 4

NewCompilerFunction · 0.92
TestExpandPostgreSQLFunction · 0.70
TestExpandMySQLFunction · 0.70
TestExpandSQLiteFunction · 0.70

Calls

no outgoing calls

Tested by 3

TestExpandPostgreSQLFunction · 0.56
TestExpandMySQLFunction · 0.56
TestExpandSQLiteFunction · 0.56