joerdav / shopping-list

9 stars 0 forks source link

sqlc setup ? #2

Open gedw99 opened 3 months ago

gedw99 commented 3 months ago

Hey Joe

I cant work out what the setup is for the sqlc generator.

go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.26.0

SQLC_FILE=$(PWD)/.sqllsrc.json
sqlc:
    # errors:  error parsing .sqllsrc.json: yaml: unmarshal errors: line 5: field connections not found in type config.V1GenerateSettings
    #sqlc -h
    cd db && sqlc generate --file $(SQLC_FILE)
joerdav commented 3 months ago

There is no reason to change dir. Just run sqlc generate in the repo root. That should work.