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
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:
22
internal/endtoend/testdata/multibyte_comment/sqlite/query.sql
vendored
Normal file
22
internal/endtoend/testdata/multibyte_comment/sqlite/query.sql
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
-- Multi-byte UTF-8 in comments must not shift the byte offsets used to slice
|
||||
-- query text out of the source file (#4523, #4235, #4372).
|
||||
|
||||
-- name: ListItems :many
|
||||
-- an em dash right here — must not truncate the ORDER BY below
|
||||
SELECT id, name, cap_read
|
||||
FROM items
|
||||
WHERE cap_read = 'anonymous'
|
||||
ORDER BY name;
|
||||
|
||||
-- section — divider between queries
|
||||
|
||||
-- name: UpdateItem :exec
|
||||
UPDATE items SET name = ? WHERE id = ?;
|
||||
|
||||
-- name: CreateItem :exec
|
||||
-- 当新建条目时,需要写入名称和权限
|
||||
INSERT INTO items (name, cap_read)
|
||||
VALUES (?, ?);
|
||||
|
||||
-- name: DeleteItem :one
|
||||
DELETE FROM items WHERE id = ? RETURNING id, name, cap_read;
|
||||
Reference in New Issue
Block a user