Skip to content

Supported retries in database/sql generation for ydb (Related to #3) #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: ydb
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/authors/sqlc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ sql:
package: authors
out: ydb
emit_json_tags: true
ydb_retry_idempotent: true


rules:
Expand Down
51 changes: 47 additions & 4 deletions examples/authors/ydb/db.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/authors/ydb/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ WHERE name = $p0;
SELECT * FROM authors
WHERE bio IS NULL;

-- name: Count :one
-- name: CountAuthors :one
SELECT COUNT(*) FROM authors;

-- name: COALESCE :many
-- name: Coalesce :many
SELECT id, name, COALESCE(bio, 'Null value!') FROM authors;

-- name: CreateOrUpdateAuthor :execresult
Expand Down
199 changes: 123 additions & 76 deletions examples/authors/ydb/query.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading