Skip to content

Commit 3b48228

Browse files
authored
chore: Finish migration to sqlc-dev/sqlc (#2548)
1 parent 4efdf15 commit 3b48228

File tree

43 files changed

+74
-75
lines changed

Some content is hidden

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

43 files changed

+74
-75
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ proto:
4949

5050
remote-proto:
5151
protoc \
52-
--go_out=. --go_opt="Minternal/remote/gen.proto=github.com/kyleconroy/sqlc/internal/remote" --go_opt=module=github.com/kyleconroy/sqlc \
53-
--go-grpc_out=. --go-grpc_opt="Minternal/remote/gen.proto=github.com/kyleconroy/sqlc/internal/remote" --go-grpc_opt=module=github.com/kyleconroy/sqlc \
52+
--go_out=. --go_opt="Minternal/remote/gen.proto=github.com/sqlc-dev/sqlc/internal/remote" --go_opt=module=github.com/sqlc-dev/sqlc \
53+
--go-grpc_out=. --go-grpc_opt="Minternal/remote/gen.proto=github.com/sqlc-dev/sqlc/internal/remote" --go-grpc_opt=module=github.com/sqlc-dev/sqlc \
5454
internal/remote/gen.proto

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# sqlc: A SQL Compiler
22

3-
![go](https://github.com/kyleconroy/sqlc/workflows/go/badge.svg)
4-
[![Go Report Card](https://goreportcard.com/badge/github.com/kyleconroy/sqlc)](https://goreportcard.com/report/github.com/kyleconroy/sqlc)
3+
![go](https://github.com/sqlc-dev/sqlc/workflows/go/badge.svg)
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/sqlc-dev/sqlc)](https://goreportcard.com/report/github.com/sqlc-dev/sqlc)
55

66
sqlc generates **type-safe code** from SQL. Here's how it works:
77

cliff.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file.\n
1010
# https://tera.netlify.app/docs/#introduction
1111
body = """
1212
{% if version %}\
13-
## [{{ version | trim_start_matches(pat="v") }}](https://github.com/kyleconroy/sqlc/releases/tag/{{ version }})
13+
## [{{ version | trim_start_matches(pat="v") }}](https://github.com/sqlc-dev/sqlc/releases/tag/{{ version }})
1414
{% else %}\
1515
## [unreleased]
1616
{% endif %}\

docs/overview/install.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ sudo snap install sqlc
1919
### Go >= 1.17:
2020

2121
```
22-
go install github.com/kyleconroy/sqlc/cmd/sqlc@latest
22+
go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
2323
```
2424

2525
### Go < 1.17:
2626

2727
```
28-
go get github.com/kyleconroy/sqlc/cmd/sqlc
28+
go get github.com/sqlc-dev/sqlc/cmd/sqlc
2929
```
3030

3131
## Docker

internal/config/override.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Override struct {
1414
GoType GoType `json:"go_type" yaml:"go_type"`
1515

1616
// additional Go struct tags to add to this field, in raw Go struct tag form, e.g. `validate:"required" x:"y,z"`
17-
// see https://github.com/kyleconroy/sqlc/issues/534
17+
// see https://github.com/sqlc-dev/sqlc/issues/534
1818
GoStructTag GoStructTag `json:"go_struct_tag" yaml:"go_struct_tag"`
1919

2020
// fully qualified name of the Go type, e.g. `github.com/segmentio/ksuid.KSUID`

internal/endtoend/testdata/case_named_params/mysql/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/1195
1+
-- https://github.com/sqlc-dev/sqlc/issues/1195
22

33
CREATE TABLE authors (
44
id BIGINT PRIMARY KEY,

internal/endtoend/testdata/case_named_params/postgresql/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/1195
1+
-- https://github.com/sqlc-dev/sqlc/issues/1195
22

33
CREATE TABLE authors (
44
id BIGSERIAL PRIMARY KEY,

internal/endtoend/testdata/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/kyleconroy/sqlc/endtoend
1+
module github.com/sqlc-dev/sqlc/endtoend
22

33
go 1.18
44

internal/endtoend/testdata/invalid_table_alias/mysql/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/437
1+
-- https://github.com/sqlc-dev/sqlc/issues/437
22
CREATE TABLE authors (
33
id INT PRIMARY KEY,
44
name VARCHAR(255) NOT NULL,

internal/endtoend/testdata/invalid_table_alias/postgresql/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/437
1+
-- https://github.com/sqlc-dev/sqlc/issues/437
22
CREATE TABLE authors (
33
id BIGSERIAL PRIMARY KEY,
44
name text NOT NULL,

internal/endtoend/testdata/invalid_table_alias/sqlite/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/437
1+
-- https://github.com/sqlc-dev/sqlc/issues/437
22
CREATE TABLE authors (
33
id INT PRIMARY KEY,
44
name VARCHAR(255) NOT NULL,

internal/endtoend/testdata/join_left/mysql/query.sql

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/604
1+
-- https://github.com/sqlc-dev/sqlc/issues/604
22
CREATE TABLE users (
33
user_id INT PRIMARY KEY,
44
city_id INT -- nullable
@@ -29,7 +29,7 @@ FROM users
2929
LEFT JOIN cities USING (city_id)
3030
LEFT JOIN mayors USING (mayor_id);
3131

32-
-- https://github.com/kyleconroy/sqlc/issues/1334
32+
-- https://github.com/sqlc-dev/sqlc/issues/1334
3333
CREATE TABLE authors (
3434
id INT PRIMARY KEY,
3535
name TEXT NOT NULL,
@@ -78,7 +78,7 @@ FROM authors a
7878
LEFT JOIN super_authors sa
7979
ON a.parent_id = sa.super_id;
8080

81-
-- https://github.com/kyleconroy/sqlc/issues/1334
81+
-- https://github.com/sqlc-dev/sqlc/issues/1334
8282
CREATE TABLE users_2 (
8383
user_id INT PRIMARY KEY,
8484
user_nickname VARCHAR(30) UNIQUE NOT NULL,

internal/endtoend/testdata/join_left/postgresql/query.sql

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
--- https://github.com/kyleconroy/sqlc/issues/604
1+
--- https://github.com/sqlc-dev/sqlc/issues/604
22
CREATE TABLE users (
33
user_id INT PRIMARY KEY,
44
city_id INT -- nullable
@@ -28,7 +28,7 @@ FROM users
2828
LEFT JOIN cities USING (city_id)
2929
LEFT JOIN mayors USING (mayor_id);
3030

31-
-- https://github.com/kyleconroy/sqlc/issues/1334
31+
-- https://github.com/sqlc-dev/sqlc/issues/1334
3232
CREATE TABLE authors (
3333
id INT PRIMARY KEY,
3434
name TEXT NOT NULL,
@@ -77,7 +77,7 @@ FROM authors a
7777
LEFT JOIN super_authors sa
7878
ON a.parent_id = sa.super_id;
7979

80-
-- https://github.com/kyleconroy/sqlc/issues/1334
80+
-- https://github.com/sqlc-dev/sqlc/issues/1334
8181
CREATE TABLE "users_2" (
8282
"user_id" uuid PRIMARY KEY,
8383
"user_nickname" VARCHAR(30) UNIQUE NOT NULL,

internal/endtoend/testdata/join_left/sqlite/query.sql

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/604
1+
-- https://github.com/sqlc-dev/sqlc/issues/604
22
CREATE TABLE users (
33
user_id INT PRIMARY KEY,
44
city_id INT -- nullable
@@ -29,7 +29,7 @@ FROM users
2929
LEFT JOIN cities USING (city_id)
3030
LEFT JOIN mayors USING (mayor_id);
3131

32-
-- https://github.com/kyleconroy/sqlc/issues/1334
32+
-- https://github.com/sqlc-dev/sqlc/issues/1334
3333
CREATE TABLE authors (
3434
id INT PRIMARY KEY,
3535
name TEXT NOT NULL,
@@ -78,7 +78,7 @@ FROM authors AS a
7878
LEFT JOIN super_authors AS sa
7979
ON a.parent_id = sa.super_id;
8080

81-
-- https://github.com/kyleconroy/sqlc/issues/1334
81+
-- https://github.com/sqlc-dev/sqlc/issues/1334
8282
CREATE TABLE users_2 (
8383
user_id INT PRIMARY KEY,
8484
user_nickname VARCHAR(30) UNIQUE NOT NULL,

internal/endtoend/testdata/missing_semicolon/mysql/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/1198
1+
-- https://github.com/sqlc-dev/sqlc/issues/1198
22
CREATE TABLE authors (
33
id INT PRIMARY KEY,
44
name VARCHAR(255) NOT NULL,

internal/endtoend/testdata/on_duplicate_key_update/mysql/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/921
1+
-- https://github.com/sqlc-dev/sqlc/issues/921
22
CREATE TABLE authors (
33
id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
44
name text NOT NULL,

internal/endtoend/testdata/on_duplicate_key_update/postgresql/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/921
1+
-- https://github.com/sqlc-dev/sqlc/issues/921
22
CREATE TABLE authors (
33
id BIGSERIAL PRIMARY KEY,
44
name text NOT NULL UNIQUE,

internal/endtoend/testdata/single_param_conflict/mysql/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ FROM authors
1717
WHERE id = ?
1818
LIMIT 1;
1919

20-
-- https://github.com/kyleconroy/sqlc/issues/1290
20+
-- https://github.com/sqlc-dev/sqlc/issues/1290
2121
CREATE TABLE users (
2222
sub TEXT PRIMARY KEY
2323
);

internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/go/query.sql.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v4/query.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ FROM authors
1717
WHERE id = $1
1818
LIMIT 1;
1919

20-
-- https://github.com/kyleconroy/sqlc/issues/1290
20+
-- https://github.com/sqlc-dev/sqlc/issues/1290
2121
CREATE TABLE users (
2222
sub UUID PRIMARY KEY
2323
);
@@ -28,7 +28,7 @@ FROM users
2828
WHERE sub = $1
2929
LIMIT 1;
3030

31-
-- https://github.com/kyleconroy/sqlc/issues/1235
31+
-- https://github.com/sqlc-dev/sqlc/issues/1235
3232

3333
-- name: SetDefaultName :one
3434
UPDATE authors

internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/go/query.sql.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/endtoend/testdata/single_param_conflict/postgresql/pgx/v5/query.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ FROM authors
1717
WHERE id = $1
1818
LIMIT 1;
1919

20-
-- https://github.com/kyleconroy/sqlc/issues/1290
20+
-- https://github.com/sqlc-dev/sqlc/issues/1290
2121
CREATE TABLE users (
2222
sub UUID PRIMARY KEY
2323
);
@@ -28,7 +28,7 @@ FROM users
2828
WHERE sub = $1
2929
LIMIT 1;
3030

31-
-- https://github.com/kyleconroy/sqlc/issues/1235
31+
-- https://github.com/sqlc-dev/sqlc/issues/1235
3232

3333
-- name: SetDefaultName :one
3434
UPDATE authors

internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/go/query.sql.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/endtoend/testdata/single_param_conflict/postgresql/stdlib/query.sql

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ FROM authors
1717
WHERE id = $1
1818
LIMIT 1;
1919

20-
-- https://github.com/kyleconroy/sqlc/issues/1290
20+
-- https://github.com/sqlc-dev/sqlc/issues/1290
2121
CREATE TABLE users (
2222
sub UUID PRIMARY KEY
2323
);
@@ -28,7 +28,7 @@ FROM users
2828
WHERE sub = $1
2929
LIMIT 1;
3030

31-
-- https://github.com/kyleconroy/sqlc/issues/1235
31+
-- https://github.com/sqlc-dev/sqlc/issues/1235
3232

3333
-- name: SetDefaultName :one
3434
UPDATE authors

internal/endtoend/testdata/single_param_conflict/sqlite/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ FROM authors
1717
WHERE id = ?
1818
LIMIT 1;
1919

20-
-- https://github.com/kyleconroy/sqlc/issues/1290
20+
-- https://github.com/sqlc-dev/sqlc/issues/1290
2121
CREATE TABLE users (
2222
sub TEXT PRIMARY KEY
2323
);

internal/endtoend/testdata/update_two_table/mysql/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/1590
1+
-- https://github.com/sqlc-dev/sqlc/issues/1590
22
CREATE TABLE authors (
33
name text NOT NULL,
44
deleted_at datetime NOT NULL,

internal/endtoend/testdata/upsert/sqlite/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- https://github.com/kyleconroy/sqlc/issues/1728
1+
-- https://github.com/sqlc-dev/sqlc/issues/1728
22

33
CREATE TABLE IF NOT EXISTS locations (
44
id INTEGER PRIMARY KEY,

internal/endtoend/testdata/valid_group_by_reference/mysql/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ FROM authors
1616
GROUP BY name;
1717

1818

19-
-- https://github.com/kyleconroy/sqlc/issues/1315
19+
-- https://github.com/sqlc-dev/sqlc/issues/1315
2020

2121
CREATE TABLE IF NOT EXISTS weather_metrics
2222
(

internal/endtoend/testdata/valid_group_by_reference/postgresql/query.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ FROM authors
1515
GROUP BY name;
1616

1717

18-
-- https://github.com/kyleconroy/sqlc/issues/1315
18+
-- https://github.com/sqlc-dev/sqlc/issues/1315
1919

2020
CREATE TABLE IF NOT EXISTS weather_metrics
2121
(

internal/endtoend/testdata/wasm_plugin_sqlc_gen_greeter/sqlc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{
1818
"name": "greeter",
1919
"wasm": {
20-
"url": "https://github.com/kyleconroy/sqlc-gen-greeter/releases/download/v0.1.0/sqlc-gen-greeter.wasm",
20+
"url": "https://github.com/sqlc-dev/sqlc-gen-greeter/releases/download/v0.1.0/sqlc-gen-greeter.wasm",
2121
"sha256": "afc486dac2068d741d7a4110146559d12a013fd0286f42a2fc7dcd802424ad07"
2222
}
2323
}

internal/ext/wasm/wasm.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func (r *Runner) loadWASM(ctx context.Context, cache string, expected string) ([
197197
// removePGCatalog removes the pg_catalog schema from the request. There is a
198198
// mysterious (reason unknown) bug with wasm plugins when a large amount of
199199
// tables (like there are in the catalog) are sent.
200-
// @see https://github.com/kyleconroy/sqlc/pull/1748
200+
// @see https://github.com/sqlc-dev/sqlc/pull/1748
201201
func removePGCatalog(req *plugin.CodeGenRequest) {
202202
if req.Catalog == nil || req.Catalog.Schemas == nil {
203203
return

internal/inflection/singular.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ func Singular(s SingularParams) string {
2020

2121
// Manual fix for incorrect handling of "campus"
2222
//
23-
// https://github.com/kyleconroy/sqlc/issues/430
23+
// https://github.com/sqlc-dev/sqlc/issues/430
2424
// https://github.com/jinzhu/inflection/issues/13
2525
if strings.ToLower(s.Name) == "campus" {
2626
return s.Name
2727
}
2828
// Manual fix for incorrect handling of "meta"
2929
//
30-
// https://github.com/kyleconroy/sqlc/issues/1217
30+
// https://github.com/sqlc-dev/sqlc/issues/1217
3131
// https://github.com/jinzhu/inflection/issues/21
3232
if strings.ToLower(s.Name) == "meta" {
3333
return s.Name
3434
}
3535
// Manual fix for incorrect handling of "calories"
3636
//
37-
// https://github.com/kyleconroy/sqlc/issues/2017
37+
// https://github.com/sqlc-dev/sqlc/issues/2017
3838
// https://github.com/jinzhu/inflection/issues/23
3939
if strings.ToLower(s.Name) == "calories" {
4040
return "calorie"

internal/plugin/codegen.pb.go

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/tools/sqlc-pg-gen/main.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ const catalogTmpl = `
4848
package {{.Pkg}}
4949
5050
import (
51-
"github.com/kyleconroy/sqlc/internal/sql/ast"
52-
"github.com/kyleconroy/sqlc/internal/sql/catalog"
51+
"github.com/sqlc-dev/sqlc/internal/sql/ast"
52+
"github.com/sqlc-dev/sqlc/internal/sql/catalog"
5353
)
5454
5555
var funcs{{.GenFnName}} = []*catalog.Function {
@@ -119,8 +119,8 @@ const loaderFuncTmpl = `
119119
package postgresql
120120
121121
import (
122-
"github.com/kyleconroy/sqlc/internal/engine/postgresql/contrib"
123-
"github.com/kyleconroy/sqlc/internal/sql/catalog"
122+
"github.com/sqlc-dev/sqlc/internal/engine/postgresql/contrib"
123+
"github.com/sqlc-dev/sqlc/internal/sql/catalog"
124124
)
125125
126126
func loadExtension(name string) *catalog.Schema {

0 commit comments

Comments
 (0)