Skip to content

Commit ce3dd10

Browse files
committed
Merge branch 'main' of github.com:kyleconroy/sqlc into kyle/wazero
2 parents 0914cad + 8aad725 commit ce3dd10

File tree

14 files changed

+66
-14
lines changed

14 files changed

+66
-14
lines changed

.github/workflows/ci-kotlin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- uses: actions/setup-go@v4
13+
- uses: actions/setup-go@v5
1414
with:
1515
go-version: '1.21.3'
1616
- name: install ./...

.github/workflows/ci-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
13-
- uses: actions/setup-go@v4
13+
- uses: actions/setup-go@v5
1414
with:
1515
go-version: '1.21.3'
1616
- name: install ./...

.github/workflows/ci-typescript.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: typescript
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
jobs:
8+
build:
9+
name: test
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-go@v5
14+
with:
15+
go-version: '1.21.3'
16+
- name: install ./...
17+
run: go install ./...
18+
- uses: actions/checkout@v4
19+
with:
20+
repository: sqlc-dev/sqlc-gen-typescript
21+
path: typescript
22+
- run: sqlc diff
23+
working-directory: typescript/examples

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- uses: actions/checkout@v4
30-
- uses: actions/setup-go@v4
30+
- uses: actions/setup-go@v5
3131
with:
3232
go-version-file: go.mod
3333
check-latest: true
@@ -63,7 +63,7 @@ jobs:
6363

6464
steps:
6565
- uses: actions/checkout@v4
66-
- uses: actions/setup-go@v4
66+
- uses: actions/setup-go@v5
6767
with:
6868
go-version-file: go.mod
6969
check-latest: true

.github/workflows/gen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
1919
steps:
2020
- uses: actions/checkout@v4
21-
- uses: actions/setup-go@v4
21+
- uses: actions/setup-go@v5
2222
with:
2323
go-version-file: go.mod
2424
check-latest: true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# STEP 1: Build sqlc
2-
FROM golang:1.21.4 AS builder
2+
FROM golang:1.21.5 AS builder
33

44
COPY . /workspace
55
WORKDIR /workspace

docs/howto/rename.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ rename:
6767
author: Writer
6868
```
6969

70+
```yaml
71+
version: "2"
72+
sql:
73+
- engine: postgresql
74+
queries: query.sql
75+
schema: query.sql
76+
overrides:
77+
go:
78+
rename:
79+
author: Writer
80+
```
81+
7082
```go
7183
package db
7284

docs/reference/config.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ Each mapping in the `sql` collection has the following keys:
5454
- A mapping to configure query analysis. See [analyzer](#analyzer) for the supported keys.
5555
- `strict_function_checks`
5656
- If true, return an error if a called SQL function does not exist. Defaults to `false`.
57+
- `strict_order_by`
58+
- If true, return an error if a order by column is ambiguous. Defaults to `true`.
5759

5860
### codegen
5961

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/google/cel-go v0.18.2
1212
github.com/google/go-cmp v0.6.0
1313
github.com/jackc/pgx/v4 v4.18.1
14-
github.com/jackc/pgx/v5 v5.5.0
14+
github.com/jackc/pgx/v5 v5.5.1
1515
github.com/jinzhu/inflection v1.0.0
1616
github.com/lib/pq v1.10.9
1717
github.com/pganalyze/pg_query_go/v4 v4.2.4-0.20231205012101-7463430c7b73
@@ -20,7 +20,7 @@ require (
2020
github.com/spf13/cobra v1.8.0
2121
github.com/spf13/pflag v1.0.5
2222
github.com/tetratelabs/wazero v1.5.0
23-
github.com/wasilibs/go-pgquery v0.0.0-20231205013331-96e794bb074e
23+
github.com/wasilibs/go-pgquery v0.0.0-20231208014744-de63626a1e99
2424
github.com/xeipuuv/gojsonschema v1.2.0
2525
golang.org/x/sync v0.5.0
2626
google.golang.org/grpc v1.59.0
@@ -53,7 +53,7 @@ require (
5353
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
5454
github.com/rogpeppe/go-internal v1.10.0 // indirect
5555
github.com/stoewer/go-strcase v1.2.0 // indirect
56-
github.com/wasilibs/wazerox v0.0.0-20231117065139-b3503f4aeff6 // indirect
56+
github.com/wasilibs/wazerox v0.0.0-20231208014050-e6b725634531 // indirect
5757
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
5858
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
5959
go.uber.org/atomic v1.11.0 // indirect

go.sum

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQ
8989
github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
9090
github.com/jackc/pgx/v4 v4.18.1 h1:YP7G1KABtKpB5IHrO9vYwSrCOhs7p3uqhvhhQBptya0=
9191
github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE=
92-
github.com/jackc/pgx/v5 v5.5.0 h1:NxstgwndsTRy7eq9/kqYc/BZh5w2hHJV86wjvO+1xPw=
93-
github.com/jackc/pgx/v5 v5.5.0/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA=
92+
github.com/jackc/pgx/v5 v5.5.1 h1:5I9etrGkLrN+2XPCsi6XLlV5DITbSL/xBZdmAxFcXPI=
93+
github.com/jackc/pgx/v5 v5.5.1/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA=
9494
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
9595
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
9696
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
@@ -187,8 +187,12 @@ github.com/tetratelabs/wazero v1.5.0 h1:Yz3fZHivfDiZFUXnWMPUoiW7s8tC1sjdBtlJn08q
187187
github.com/tetratelabs/wazero v1.5.0/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A=
188188
github.com/wasilibs/go-pgquery v0.0.0-20231205013331-96e794bb074e h1:sGIC6/D0KqpA+qBSDSVDQswU/IJVYkbnUXnipgTLQWk=
189189
github.com/wasilibs/go-pgquery v0.0.0-20231205013331-96e794bb074e/go.mod h1:KW0azBSWqkPZ71r+3O4qt8h6A/NisFLp0rbjZ3py4OE=
190+
github.com/wasilibs/go-pgquery v0.0.0-20231208014744-de63626a1e99 h1:HFee1ByN4FrqNVd53Mo28ccGO+g5gxqUV/gdvKMe4b8=
191+
github.com/wasilibs/go-pgquery v0.0.0-20231208014744-de63626a1e99/go.mod h1:f2JMhFocVxY3VKMd9ykUxMnX4EVew9WOgjnfaNBB6C8=
190192
github.com/wasilibs/wazerox v0.0.0-20231117065139-b3503f4aeff6 h1:jwbU8u5TuXModzdEG4wI0g4FyuD7ROSttU86go5sPdU=
191193
github.com/wasilibs/wazerox v0.0.0-20231117065139-b3503f4aeff6/go.mod h1:IQNVyA4d1hWIe23mlMMuqXjyWMdndgSlNx6FqBkwPsM=
194+
github.com/wasilibs/wazerox v0.0.0-20231208014050-e6b725634531 h1:zVJ4SZgaEE9sEH2L9k1+eAvCNa/WAAnT9UiMa3/tQrI=
195+
github.com/wasilibs/wazerox v0.0.0-20231208014050-e6b725634531/go.mod h1:IQNVyA4d1hWIe23mlMMuqXjyWMdndgSlNx6FqBkwPsM=
192196
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
193197
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
194198
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=

internal/cmd/vet.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"github.com/jackc/pgx/v5"
2121
"github.com/spf13/cobra"
2222
"google.golang.org/protobuf/encoding/protojson"
23-
_ "modernc.org/sqlite"
2423

2524
"github.com/sqlc-dev/sqlc/internal/config"
2625
"github.com/sqlc-dev/sqlc/internal/debug"

internal/cmd/vet_modernc.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//go:build !wasm
2+
3+
package cmd
4+
5+
import (
6+
_ "modernc.org/sqlite"
7+
)

internal/sqltest/sqlite.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import (
77
"testing"
88

99
"github.com/sqlc-dev/sqlc/internal/sql/sqlpath"
10-
11-
_ "modernc.org/sqlite"
1210
)
1311

1412
func SQLite(t *testing.T, migrations []string) (*sql.DB, func()) {

internal/sqltest/sqlite_modernc.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//go:build !wasm
2+
3+
package sqltest
4+
5+
import (
6+
_ "modernc.org/sqlite"
7+
)

0 commit comments

Comments
 (0)