File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -438,6 +438,53 @@ sponsor](https://github.com/sponsors/kyleconroy) today.
438
438
439
439
Sponsors receive priority support via the sqlc Slack organization.
440
440
441
+ ## Development
442
+
443
+ ### Building
444
+
445
+ For local development, install ` sqlc ` under an alias. We suggest ` sqlc-dev ` .
446
+
447
+ ```
448
+ go build -o ~/go/bin/sqlc-dev ./cmd/sqlc
449
+ ```
450
+
451
+ ### Running Tests
452
+
453
+ To run the tests, include the ` exp ` tag. Without this tag, a few tests will
454
+ fail.
455
+
456
+ ```
457
+ go test --tags=exp ./...
458
+ ```
459
+
460
+ To run the tests in the examples folder, a running PostgreSQL instance is
461
+ required. The tests use the following environment variables to connect to the
462
+ database:
463
+
464
+ ```
465
+ Variable Default Value
466
+ -------------------------
467
+ PG_HOST 127.0.0.1
468
+ PG_PORT 5432
469
+ PG_USER postgres
470
+ PG_PASSWORD mysecretpassword
471
+ PG_DATABASE dinotest
472
+ ```
473
+
474
+ ```
475
+ go test --tags=examples,exp ./...
476
+ ```
477
+
478
+ ### Regenerate exepected test output
479
+
480
+ If you need to update a large number of expexted test output in the
481
+ ` internal/endtoend/testdata ` directory, run the ` regenerate.sh ` script.
482
+
483
+ ```
484
+ cd internal/endtoend
485
+ ./regenerate.sh
486
+ ```
487
+
441
488
## Acknowledgements
442
489
443
490
sqlc was inspired by [ PugSQL] ( https://pugsql.org/ ) and
You can’t perform that action at this time.
0 commit comments