Skip to content

Commit 2477d5c

Browse files
committed
2 parents ea8187c + 92fe967 commit 2477d5c

File tree

1,580 files changed

+47146
-14997
lines changed

Some content is hidden

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

1,580 files changed

+47146
-14997
lines changed

.devcontainer/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# [Choice] Go version (use -bullseye variants on local arm64/Apple Silicon): 1, 1.16, 1.17, 1-bullseye, 1.16-bullseye, 1.17-bullseye, 1-buster, 1.16-buster, 1.17-buster
2+
ARG VARIANT=1.17-bullseye
3+
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
4+
5+
# [Optional] If your requirements rarely change, uncomment this section to add them to the image.
6+
# COPY requirements.txt /tmp/pip-tmp/
7+
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
8+
# && rm -rf /tmp/pip-tmp
9+
10+
# [Optional] Uncomment this section to install additional OS packages.
11+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
12+
# && apt-get -y install --no-install-recommends <your-package-list-here>
13+
14+
15+

.devcontainer/devcontainer.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/python-3-postgres
3+
// Update the VARIANT arg in docker-compose.yml to pick a Python version
4+
{
5+
"name": "sqlc",
6+
"dockerComposeFile": "docker-compose.yml",
7+
"service": "app",
8+
"workspaceFolder": "/workspace",
9+
10+
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
11+
12+
// Set *default* container specific settings.json values on container create.
13+
"settings": {
14+
"sqltools.connections": [{
15+
"name": "Container database",
16+
"driver": "PostgreSQL",
17+
"previewLimit": 50,
18+
"server": "postgresql",
19+
"port": 5432,
20+
"database": "dinotest",
21+
"username": "postgres",
22+
"password": "mysecretpassword"
23+
}],
24+
"go.toolsManagement.checkForUpdates": "local",
25+
"go.useLanguageServer": true,
26+
"go.gopath": "/go",
27+
"go.goroot": "/usr/local/go"
28+
},
29+
30+
// Add the IDs of extensions you want installed when the container is created.
31+
"extensions": [
32+
"golang.Go",
33+
"mtxr.sqltools",
34+
"mtxr.sqltools-driver-pg",
35+
"mtxr.sqltools-driver-mysql"
36+
],
37+
38+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
39+
// "forwardPorts": [5000, 5432],
40+
41+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
42+
"remoteUser": "vscode"
43+
}

.devcontainer/docker-compose.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
version: '3.8'
2+
3+
services:
4+
app:
5+
build:
6+
context: ..
7+
dockerfile: .devcontainer/Dockerfile
8+
args:
9+
VARIANT: 1.17-bullseye
10+
11+
volumes:
12+
- ..:/workspace:cached
13+
14+
# Overrides default command so things don't shut down after the process ends.
15+
command: sleep infinity
16+
17+
environment:
18+
PG_HOST: postgresql
19+
PG_USER: postgres
20+
PG_DATABASE: dinotest
21+
PG_PASSWORD: mysecretpassword
22+
MYSQL_DATABASE: dinotest
23+
MYSQL_HOST: mysql
24+
MYSQL_ROOT_PASSWORD: mysecretpassword
25+
26+
mysql:
27+
image: "mysql:8"
28+
ports:
29+
- "3306:3306"
30+
restart: unless-stopped
31+
environment:
32+
MYSQL_DATABASE: dinotest
33+
MYSQL_ROOT_PASSWORD: mysecretpassword
34+
35+
postgresql:
36+
image: "postgres:13"
37+
ports:
38+
- "5432:5432"
39+
restart: unless-stopped
40+
environment:
41+
POSTGRES_DB: dinotest
42+
POSTGRES_PASSWORD: mysecretpassword
43+
POSTGRES_USER: postgres
44+
45+
# Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally.
46+
# (Adding the "ports" property to this file will not forward from a Codespace.)

.github/ISSUE_TEMPLATE/BUG_REPORT.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ body:
99
description: What version of sqlc are you running? If you don't know, run `sqlc version`.
1010
multiple: false
1111
options:
12+
- 1.12.0
1213
- 1.11.0
1314
- 1.10.0
14-
- 1.9.0
1515
- Other
1616
validations:
1717
required: true
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Feature Request
2+
description: Request a new fetaure or a change to an existing feature
3+
labels: [enhancement, triage]
4+
body:
5+
- type: textarea
6+
id: feature
7+
attributes:
8+
label: What do you want to change?
9+
placeholder: Tell us what you want
10+
value: "Free unicorns!"
11+
validations:
12+
required: true
13+
- type: dropdown
14+
id: engines
15+
attributes:
16+
label: What database engines need to be changed?
17+
multiple: true
18+
options:
19+
- PostgreSQL
20+
- MySQL
21+
- type: dropdown
22+
id: languages
23+
attributes:
24+
label: What programming language backends need to be changed?
25+
multiple: true
26+
options:
27+
- Go
28+
- Python
29+
- Kotlin

.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.4.0
33+
- uses: actions/checkout@v3
3434
- uses: actions/setup-java@v2
3535
with:
3636
distribution: 'adopt'

.github/workflows/ci-python.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2424

2525
steps:
26-
- uses: actions/checkout@v2.4.0
27-
- uses: actions/setup-python@v2
26+
- uses: actions/checkout@v3
27+
- uses: actions/setup-python@v3
2828
with:
2929
python-version: 3.9
3030
- name: Install python dependencies

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ jobs:
3030
- 3306:3306
3131

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

3535
- uses: actions/setup-go@v2
3636
with:
37-
go-version: '1.17'
37+
go-version: '1.18'
3838

3939
- name: test ./...
4040
run: go test --tags=examples ./...
@@ -52,7 +52,3 @@ jobs:
5252
- name: build internal/endtoend
5353
run: go build ./...
5454
working-directory: internal/endtoend/testdata
55-
56-
- name: test internal/endtoend
57-
run: go test ./...
58-
working-directory: internal/endtoend/testdata

.github/workflows/docker.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

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

44
COPY . /workspace
55
WORKDIR /workspace

0 commit comments

Comments
 (0)