Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,53 @@ sponsor](https://github.com/sponsors/kyleconroy) today.

Sponsors receive priority support via the sqlc Slack organization.

## Development

### Building

For local development, install `sqlc` under an alias. We suggest `sqlc-dev`.

```
go build -o ~/go/bin/sqlc-dev ./cmd/sqlc
```

### Running Tests

To run the tests, include the `exp` tag. Without this tag, a few tests will
fail.

```
go test --tags=exp ./...
```

To run the tests in the examples folder, a running PostgreSQL instance is
required. The tests use the following environment variables to connect to the
database:

```
Variable Default Value
-------------------------
PG_HOST 127.0.0.1
PG_PORT 5432
PG_USER postgres
PG_PASSWORD mysecretpassword
PG_DATABASE dinotest
```

```
go test --tags=examples,exp ./...
```

### Regenerate exepected test output

If you need to update a large number of expexted test output in the
`internal/endtoend/testdata` directory, run the `regenerate.sh` script.

```
cd internal/endtoend
./regenerate.sh
```

## Acknowledgements

sqlc was inspired by [PugSQL](https://pugsql.org/) and
Expand Down