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

Function parseType

internal/engine/postgresql/analyzer/analyze.go:173–183  ·  view source on GitHub ↗
(dt string)

Source from the content-addressed store, hash-verified

171}
172
173func parseType(dt string) (string, bool, int) {
174 size := 0
175 for {
176 trimmed := strings.TrimSuffix(dt, "[]")
177 if trimmed == dt {
178 return rewriteType(dt), size > 0, size
179 }
180 size += 1
181 dt = trimmed
182 }
183}
184
185// Don't create a database per query
186func (a *Analyzer) Analyze(ctx context.Context, n ast.Node, query string, migrations []string, ps *named.ParamSet) (*core.Analysis, error) {

Callers 2

AnalyzeMethod · 0.85
IntrospectSchemaMethod · 0.85

Calls 1

rewriteTypeFunction · 0.85

Tested by

no test coverage detected