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

Function Validate

internal/config/validate.go:3–12  ·  view source on GitHub ↗
(c *Config)

Source from the content-addressed store, hash-verified

1package config
2
3func Validate(c *Config) error {
4 for _, sql := range c.SQL {
5 if sql.Database != nil {
6 if sql.Database.URI == "" && !sql.Database.Managed {
7 return ErrInvalidDatabase
8 }
9 }
10 }
11 return nil
12}

Callers 4

ProcessFunction · 0.92
GenerateFunction · 0.92
VetFunction · 0.92
TestInvalidConfigFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestInvalidConfigFunction · 0.68