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

Function ValidateOpts

internal/codegen/golang/opts/options.go:149–158  ·  view source on GitHub ↗
(opts *Options)

Source from the content-addressed store, hash-verified

147}
148
149func ValidateOpts(opts *Options) error {
150 if opts.EmitMethodsWithDbArgument && opts.EmitPreparedQueries {
151 return fmt.Errorf("invalid options: emit_methods_with_db_argument and emit_prepared_queries options are mutually exclusive")
152 }
153 if *opts.QueryParameterLimit < 0 {
154 return fmt.Errorf("invalid options: query parameter limit must not be negative")
155 }
156
157 return nil
158}

Callers 1

GenerateFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected