From e2363bf8903d333acaad3cc8f463911bd0ebbe9b Mon Sep 17 00:00:00 2001 From: SockworkOrange <26390445+SockworkOrange@users.noreply.github.com> Date: Wed, 6 Aug 2025 19:08:31 +0000 Subject: [PATCH] update docs --- README.md | 23 +++++++++++++++-------- docs/02_Quickstart.md | 4 ++-- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0db23203..2dd87d38 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ version: "2" plugins: - name: csharp wasm: - url: https://github.com/DaredevilOSS/sqlc-gen-csharp/releases/download/v0.19.0/sqlc-gen-csharp.wasm - sha256: 82e1a2dfc44ba5052c1e310aa2cda82d2825b8dc57000ce4dd6519249e5ea0fe + url: https://github.com/DaredevilOSS/sqlc-gen-csharp/releases/download/v0.20.0/sqlc-gen-csharp.wasm + sha256: 3d0a7d09a93b6135c4e043acbbd862d28e2535f20a43292a842a75ac37f35aa0 sql: # For PostgresSQL - schema: schema.sql @@ -158,8 +158,16 @@ More info can be found in [here](https://docs.sqlc.dev/en/stable/howto/transacti
:execlastid - Implementation -Implemented via a `RETURNING` clause, allowing the `INSERT` command to return the newly created id, which can be of any -data type that can have a unique constraint. +Implemented via a `RETURNING` clause, allowing the `INSERT` command to return the newly created id. +The data types that can be used as id data types for this annotation are: +1. uuid +2. bigint +3. integer +4. smallint (less recommended due to small id range, but possible) + +```sql +INSERT INTO tab1 (field1, field2) VALUES ('a', 1) RETURNING id_field; +```
@@ -312,13 +320,12 @@ we consider support for the different data types separately for batch inserts an :execlastid - Implementation ## :execlastid - Implementation -Implemented via a `RETURNING` clause, allowing the `INSERT` command to return the newly created id, which can be of any -data type that can have a unique constraint. - +Implemented via a `RETURNING` clause, allowing the `INSERT` command to return the newly created id. +Only integer data type is supported as id for this annotation. + ```sql INSERT INTO tab1 (field1, field2) VALUES ('a', 1) RETURNING id_field; ``` -
diff --git a/docs/02_Quickstart.md b/docs/02_Quickstart.md index 78713f26..f9bd02bc 100644 --- a/docs/02_Quickstart.md +++ b/docs/02_Quickstart.md @@ -4,8 +4,8 @@ version: "2" plugins: - name: csharp wasm: - url: https://github.com/DaredevilOSS/sqlc-gen-csharp/releases/download/v0.19.0/sqlc-gen-csharp.wasm - sha256: 82e1a2dfc44ba5052c1e310aa2cda82d2825b8dc57000ce4dd6519249e5ea0fe + url: https://github.com/DaredevilOSS/sqlc-gen-csharp/releases/download/v0.20.0/sqlc-gen-csharp.wasm + sha256: 3d0a7d09a93b6135c4e043acbbd862d28e2535f20a43292a842a75ac37f35aa0 sql: # For PostgresSQL - schema: schema.sql