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

Function Process

internal/cmd/process.go:32–53  ·  view source on GitHub ↗
(ctx context.Context, rp ResultProcessor, dir, filename string, o *Options)

Source from the content-addressed store, hash-verified

30}
31
32func Process(ctx context.Context, rp ResultProcessor, dir, filename string, o *Options) error {
33 e := o.Env
34 stderr := o.Stderr
35
36 configPath, conf, err := o.ReadConfig(dir, filename)
37 if err != nil {
38 return err
39 }
40
41 base := filepath.Base(configPath)
42 if err := config.Validate(conf); err != nil {
43 fmt.Fprintf(stderr, "error validating %s: %s\n", base, err)
44 return err
45 }
46
47 if err := e.Validate(conf); err != nil {
48 fmt.Fprintf(stderr, "error validating %s: %s\n", base, err)
49 return err
50 }
51
52 return processQuerySets(ctx, rp, conf, dir, o)
53}
54
55func processQuerySets(ctx context.Context, rp ResultProcessor, conf *config.Config, dir string, o *Options) error {
56 stderr := o.Stderr

Callers 1

PushFunction · 0.85

Calls 4

ValidateFunction · 0.92
processQuerySetsFunction · 0.85
ReadConfigMethod · 0.80
ValidateMethod · 0.45

Tested by

no test coverage detected