snapshot of https://github.com/sqlc-dev/sqlc.git (main, 2026-09-16; blobs > 131072B omitted)
Some checks failed
kotlin / test (push) Has been skipped
python / test (push) Has been skipped
typescript / test (push) Has been skipped
go / build darwin/amd64 (push) Has been cancelled
go / build linux/amd64 (push) Has been cancelled
go / build windows/amd64 (push) Has been cancelled
go / build darwin/arm64 (push) Has been cancelled
go / build linux/arm64 (push) Has been cancelled
go / build windows/arm64 (push) Has been cancelled
go / test (push) Has been cancelled
go / vuln_check (push) Has been cancelled

This commit is contained in:
upstream-mirror
2026-09-16 02:17:34 +05:00
commit 0f4df23290
7340 changed files with 238743 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
package querytest
import (
"context"
"github.com/jackc/pgconn"
"github.com/jackc/pgx/v4"
)
type DBTX interface {
Exec(context.Context, string, ...any) (pgconn.CommandTag, error)
Query(context.Context, string, ...any) (pgx.Rows, error)
QueryRow(context.Context, string, ...any) pgx.Row
}
func New(db DBTX) *Queries {
return &Queries{db: db}
}
type Queries struct {
db DBTX
}
func (q *Queries) WithTx(tx pgx.Tx) *Queries {
return &Queries{
db: tx,
}
}

View File

@@ -0,0 +1,20 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
package querytest
type Bar struct {
ID int32
Name string
}
type Exclusions struct {
ID int32
Name string
}
type MyData struct {
ID int32
Name string
}

View File

@@ -0,0 +1,43 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
// source: query.sql
package querytest
import (
"context"
)
const deleteBarByID = `-- name: DeleteBarByID :one
DELETE FROM bars WHERE id = $1 RETURNING id, name
`
func (q *Queries) DeleteBarByID(ctx context.Context, id int32) (Bar, error) {
row := q.db.QueryRow(ctx, deleteBarByID, id)
var i Bar
err := row.Scan(&i.ID, &i.Name)
return i, err
}
const deleteExclusionByID = `-- name: DeleteExclusionByID :one
DELETE FROM exclusions WHERE id = $1 RETURNING id, name
`
func (q *Queries) DeleteExclusionByID(ctx context.Context, id int32) (Exclusions, error) {
row := q.db.QueryRow(ctx, deleteExclusionByID, id)
var i Exclusions
err := row.Scan(&i.ID, &i.Name)
return i, err
}
const deleteMyDataByID = `-- name: DeleteMyDataByID :one
DELETE FROM my_data WHERE id = $1 RETURNING id, name
`
func (q *Queries) DeleteMyDataByID(ctx context.Context, id int32) (MyData, error) {
row := q.db.QueryRow(ctx, deleteMyDataByID, id)
var i MyData
err := row.Scan(&i.ID, &i.Name)
return i, err
}

View File

@@ -0,0 +1,8 @@
-- name: DeleteBarByID :one
DELETE FROM bars WHERE id = $1 RETURNING id, name;
-- name: DeleteMyDataByID :one
DELETE FROM my_data WHERE id = $1 RETURNING id, name;
-- name: DeleteExclusionByID :one
DELETE FROM exclusions WHERE id = $1 RETURNING id, name;

View File

@@ -0,0 +1,4 @@
CREATE TABLE bars (id serial not null, name text not null, primary key (id));
CREATE TABLE my_data (id serial not null, name text not null, primary key (id));
CREATE TABLE exclusions (id serial not null, name text not null, primary key (id));

View File

@@ -0,0 +1,21 @@
{
"version": "2",
"sql": [
{
"engine": "postgresql",
"schema": "schema.sql",
"queries": "query.sql",
"gen": {
"go": {
"package": "querytest",
"sql_package": "pgx/v4",
"out": "go",
"inflection_exclude_table_names": [
"my_data",
"exclusions"
]
}
}
}
]
}

View File

@@ -0,0 +1,32 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
package querytest
import (
"context"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
)
type DBTX interface {
Exec(context.Context, string, ...any) (pgconn.CommandTag, error)
Query(context.Context, string, ...any) (pgx.Rows, error)
QueryRow(context.Context, string, ...any) pgx.Row
}
func New(db DBTX) *Queries {
return &Queries{db: db}
}
type Queries struct {
db DBTX
}
func (q *Queries) WithTx(tx pgx.Tx) *Queries {
return &Queries{
db: tx,
}
}

View File

@@ -0,0 +1,20 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
package querytest
type Bar struct {
ID int32
Name string
}
type Exclusions struct {
ID int32
Name string
}
type MyData struct {
ID int32
Name string
}

View File

@@ -0,0 +1,43 @@
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.31.1
// source: query.sql
package querytest
import (
"context"
)
const deleteBarByID = `-- name: DeleteBarByID :one
DELETE FROM bars WHERE id = $1 RETURNING id, name
`
func (q *Queries) DeleteBarByID(ctx context.Context, id int32) (Bar, error) {
row := q.db.QueryRow(ctx, deleteBarByID, id)
var i Bar
err := row.Scan(&i.ID, &i.Name)
return i, err
}
const deleteExclusionByID = `-- name: DeleteExclusionByID :one
DELETE FROM exclusions WHERE id = $1 RETURNING id, name
`
func (q *Queries) DeleteExclusionByID(ctx context.Context, id int32) (Exclusions, error) {
row := q.db.QueryRow(ctx, deleteExclusionByID, id)
var i Exclusions
err := row.Scan(&i.ID, &i.Name)
return i, err
}
const deleteMyDataByID = `-- name: DeleteMyDataByID :one
DELETE FROM my_data WHERE id = $1 RETURNING id, name
`
func (q *Queries) DeleteMyDataByID(ctx context.Context, id int32) (MyData, error) {
row := q.db.QueryRow(ctx, deleteMyDataByID, id)
var i MyData
err := row.Scan(&i.ID, &i.Name)
return i, err
}

View File

@@ -0,0 +1,8 @@
-- name: DeleteBarByID :one
DELETE FROM bars WHERE id = $1 RETURNING id, name;
-- name: DeleteMyDataByID :one
DELETE FROM my_data WHERE id = $1 RETURNING id, name;
-- name: DeleteExclusionByID :one
DELETE FROM exclusions WHERE id = $1 RETURNING id, name;

View File

@@ -0,0 +1,4 @@
CREATE TABLE bars (id serial not null, name text not null, primary key (id));
CREATE TABLE my_data (id serial not null, name text not null, primary key (id));
CREATE TABLE exclusions (id serial not null, name text not null, primary key (id));

View File

@@ -0,0 +1,21 @@
{
"version": "2",
"sql": [
{
"engine": "postgresql",
"schema": "schema.sql",
"queries": "query.sql",
"gen": {
"go": {
"package": "querytest",
"sql_package": "pgx/v5",
"out": "go",
"inflection_exclude_table_names": [
"my_data",
"exclusions"
]
}
}
}
]
}