Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b524213
Upgrade to pgx v5
jschaf Jan 2, 2024
4bb40e2
experiment with codecs
jschaf Jan 5, 2024
500b5c6
More experiments with codecs
jschaf Jan 6, 2024
8e58ee0
Simplify codec
jschaf Jan 25, 2024
1b29c21
fix most author example tests
jschaf Jan 25, 2024
2b41dd1
move codecs into template
jschaf Jan 26, 2024
7ca7c67
update template for code
jschaf Jan 26, 2024
6d5a5ff
Run tests through dockerized Postgres wrapper
meoyawn May 6, 2026
6dfe30c
Merge remote-tracking branch 'upstream/joe/pgxv5' into meoyawn/pgxv5
meoyawn May 6, 2026
79e1b92
Finish pgx v5 generated query support
meoyawn May 6, 2026
ebeee45
Restore generated type registration test coverage
meoyawn May 6, 2026
8b76a4d
Add pgx ltree array override coverage
meoyawn May 6, 2026
47c9148
Trim blank declarer output
meoyawn May 6, 2026
ddc4ef2
Fix zero returns for custom scalar results
meoyawn May 6, 2026
24c47e8
Use CollectOneRow for one queries
meoyawn May 6, 2026
adb89a8
Wrap collection errors with query context
meoyawn May 6, 2026
a6e9a74
Update README for pgx v5
meoyawn May 6, 2026
5106fe9
Make pgx v5 fork go-gettable
meoyawn May 7, 2026
10ab942
Upgrade Docker dependencies
meoyawn May 7, 2026
0751c2b
Add projection interfaces for query rows
meoyawn Jun 2, 2026
29ec198
Use pointer receivers for projection getters
meoyawn Jun 2, 2026
3a56366
taskfile
meoyawn Jun 18, 2026
8055dbf
gitignore
meoyawn Jun 18, 2026
db035d4
Add shared row annotations
meoyawn Jun 18, 2026
d7606d8
Add stream query support
meoyawn Jun 18, 2026
740c219
Add domain type resolution for custom IDs
meoyawn Jun 19, 2026
abf9635
Document shared row structs and streaming queries
meoyawn Jun 19, 2026
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
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/*.iml
/.idea/
/dist/
*.iml
.idea/
dist/
.DS_Store
.task/
.code-review-graph/
28 changes: 14 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ First, read [ARCHITECTURE.md](ARCHITECTURE.md) to get a lay of the land.
# Dependencies - see Setup below

# Start a long-lived Postgres server in Docker for integration tests.
# Connect with "make psql"
make start
# Connect with "task psql"
task start

# Hack
# Commit changes

# Validate changes
make lint && make test && make acceptance-test
# make all - equivalent
# make - equivalent
task lint && task test && task acceptance-test
# task all - equivalent
# task - equivalent

# Send PR to GitHub. Check that tests and lints passed.

# Stop Postgres server running in Docker.
make stop
task stop
```

## Design goals of pggen
Expand Down Expand Up @@ -72,8 +72,8 @@ tests from one another. Creating a new schema is much faster than spinning up a
new Dockerized Postgres instance.

```shell
make start
make test # all unit tests
task start
task test # all unit tests
```

To run the acceptance tests to validate that pggen produces the same code as
Expand All @@ -83,29 +83,29 @@ the checked-in example code:
# Acceptance tests check that there's no Git diffs so commit code first.
git commit -m "some message"

make acceptance-test
task acceptance-test
```

To update the acceptance tests after changing the code generator:

```shell
make update-acceptance-test
task update-acceptance-test
```

### Testing hierarchy

pggen has tests at most parts of the testing hierarchy.

- Unit tests to test the logic of small, independent components, like
[casing_test.go]. Run with `make test`.
[casing_test.go]. Run with `task test`.

- Integration tests like the [pginfer_test.go] to test that the code works
(integrates) with different subsystems like Postgres, Docker, or other Go
packages. As with unit tests, run with `make test`.
packages. As with unit tests, run with `task test`.

- Acceptance tests like [example/nested/codegen_test.go] to test that pggen
produces the exact same output as the checked-in examples. Run with
`make acceptance-test`.
`task acceptance-test`.

[casing_test.go]: internal/casing/casing_test.go
[pginfer_test.go]: internal/pginfer/pginfer_test.go
Expand All @@ -131,4 +131,4 @@ in the test output. You can connect to that schema with:
PGPASSWORD=hunter2 psql --host=127.0.0.1 --port=5555 --username=postgres pggen

postgres> set search_path to 'pggen_test_<SOME_NUMBER>'
```
```
52 changes: 0 additions & 52 deletions Makefile

This file was deleted.

Loading