Skip to content

Commit 6f2ce6a

Browse files
committed
Merge branch 'main' of git://github.com/kyleconroy/sqlc
2 parents f5cc9c5 + 98d76a6 commit 6f2ce6a

File tree

202 files changed

+4587
-417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+4587
-417
lines changed

.github/workflows/ci-kotlin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- 3306:3306
3131

3232
steps:
33-
- uses: actions/checkout@v2.3.5
33+
- uses: actions/checkout@v2.4.0
3434
- uses: actions/setup-java@v2
3535
with:
3636
distribution: 'adopt'

.github/workflows/ci-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2424

2525
steps:
26-
- uses: actions/checkout@v2.3.5
26+
- uses: actions/checkout@v2.4.0
2727
- uses: actions/setup-python@v2
2828
with:
2929
python-version: 3.9

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- 3306:3306
3131

3232
steps:
33-
- uses: actions/checkout@v2.3.5
33+
- uses: actions/checkout@v2.4.0
3434

3535
- uses: actions/setup-go@v2
3636
with:

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
id: prep
1313
run: |
1414
echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
15-
- uses: actions/checkout@v2.3.5
15+
- uses: actions/checkout@v2.4.0
1616
- uses: docker/setup-buildx-action@v1
1717
- uses: docker/setup-qemu-action@v1
1818
- uses: docker/[email protected]

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.17.2 AS builder
2+
FROM golang:1.17.3 AS builder
33

44
COPY . /workspace
55
WORKDIR /workspace

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ sqlc development is funded by our [generous
2424
sponsors](https://github.com/sponsors/kyleconroy), including the following
2525
companies:
2626

27+
- [Context](https://context.app)
2728
- [Meter](https://meter.com)
2829
- [ngrok](https://ngrok.com)
2930
- [RStudio](https://www.rstudio.com/)

cliff.toml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# configuration file for git-cliff (0.1.0)
2+
3+
[changelog]
4+
# changelog header
5+
header = """
6+
# Changelog
7+
All notable changes to this project will be documented in this file.\n
8+
"""
9+
# template for the changelog body
10+
# https://tera.netlify.app/docs/#introduction
11+
body = """
12+
{% if version %}\
13+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
14+
{% else %}\
15+
## [unreleased]
16+
{% endif %}\
17+
{% for group, commits in commits | group_by(attribute="group") %}
18+
### {{ group | upper_first }}
19+
{% for commit in commits %}
20+
- {{ commit.message | upper_first }}\
21+
{% endfor %}
22+
{% endfor %}\n
23+
"""
24+
# remove the leading and trailing whitespaces from the template
25+
trim = true
26+
# changelog footer
27+
footer = """
28+
<!-- generated by git-cliff -->
29+
"""
30+
31+
[git]
32+
# allow only conventional commits
33+
# https://www.conventionalcommits.org
34+
conventional_commits = true
35+
# regex for parsing and grouping commits
36+
commit_parsers = [
37+
{ message = "^feat", group = "Features"},
38+
{ message = "^fix", group = "Bug Fixes"},
39+
{ message = "^doc", group = "Documentation"},
40+
{ message = "^perf", group = "Performance"},
41+
{ message = "^refactor", group = "Refactor"},
42+
{ message = "^style", group = "Styling"},
43+
{ message = "^test", group = "Testing"},
44+
{ message = "^chore\\(release\\): prepare for", skip = true},
45+
{ message = "^chore", group = "Miscellaneous Tasks"},
46+
{ body = ".*security", group = "Security"},
47+
]
48+
# filter out the commits that are not matched by commit parsers
49+
filter_commits = false
50+
# glob pattern for matching git tags
51+
tag_pattern = "v[0-9]*"
52+
# regex for skipping tags
53+
skip_tags = "v0.1.0-beta.1"

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'Kyle Conroy'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '1.10.0'
25+
release = '1.11.0'
2626

2727

2828
# -- General configuration ---------------------------------------------------

docs/howto/ddl.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ DROP TABLE people;
7575
package db
7676

7777
type People struct {
78-
ID int32
78+
ID int32
7979
}
8080
```
8181

@@ -91,13 +91,31 @@ DROP TABLE comment;
9191
package db
9292

9393
type Comment struct {
94-
ID int32
95-
Text string
94+
ID int32
95+
Text string
9696
}
9797
```
9898

9999
### golang-migrate
100100

101+
Warning: [golang-migrate specifies](https://github.com/golang-migrate/migrate/blob/master/MIGRATIONS.md#migration-filename-format) that the version number in the migration file name is to be interpreted numerically. However, sqlc executes the migration files in **lexicographic** order. If you choose to simply enumerate your migration versions, make sure to prepend enough zeros to the version number to avoid any unexpected behavior.
102+
103+
Probably doesn't work as intended:
104+
```
105+
1_initial.up.sql
106+
...
107+
9_foo.up.sql
108+
# this migration file will be executed BEFORE 9_foo
109+
10_bar.up.sql
110+
```
111+
Works as was probably intended:
112+
```
113+
001_initial.up.sql
114+
...
115+
009_foo.up.sql
116+
010_bar.up.sql
117+
```
118+
101119
In `20060102.up.sql`:
102120

103121
```sql

docs/howto/named_parameters.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ RETURNING *;
1717

1818
```go
1919
type UpdateAuthorNameParams struct {
20-
Column1 bool `json:""`
21-
Column2_2 string `json:"_2"`
20+
Column1 bool `json:""`
21+
Column2_2 string `json:"_2"`
2222
}
2323
```
2424

@@ -38,8 +38,8 @@ RETURNING *;
3838

3939
```go
4040
type UpdateAuthorNameParams struct {
41-
SetName bool `json:"set_name"`
42-
Name string `json:"name"`
41+
SetName bool `json:"set_name"`
42+
Name string `json:"name"`
4343
}
4444
```
4545

0 commit comments

Comments
 (0)