You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| useDapper | default: `false`<br/>values: `false`,`true` | Yes | Enables Dapper as a thin wrapper for the generated code. For more information, please refer to the [Dapper documentation](https://github.com/DapperLib/Dapper). |
49
49
| overrideDapperVersion | default:<br/> `2.1.35`<br/>values: The desired Dapper version | Yes | If `useDapper` is set to `true`, this option allows you to override the version of Dapper to be used. |
50
50
51
-
## Query Annotations
51
+
## Supported Features
52
+
- ✅ means the feature is fully supported.
53
+
- 🚫 means the database does not support the feature.
54
+
- ❌ means the feature is not supported by the plugin (but could be supported by the database).
55
+
56
+
### Query Annotations
52
57
Basic functionality - same for all databases:
53
58
- `:one`- returns 0...1 records
54
59
- `:many`- returns 0...n records
@@ -60,26 +65,22 @@ Advanced functionality - varies between databases:
- ❌ means the feature is not supported by the plugin (but could be supported by the database).
75
+
| :copyfrom | ✅ | ✅ | ✅ |
74
76
75
77
More info can be found in [here](https://docs.sqlc.dev/en/stable/reference/query-annotations.html).
76
78
77
-
## Macro Annotations
79
+
### Macro Annotations
78
80
- `sqlc.arg`- Attach a name to a parameter in a SQL query
79
81
- `sqlc.narg`- The same as `sqlc.arg`, but always marks the parameter as nullable
80
82
- `sqlc.slice`- For databases that do not support passing arrays to the `IN` operator, generates a dynamic query at runtime with the correct number of parameters
81
83
- `sqlc.embed`- Embedding allows you to reuse existing model structs in more queries
82
-
83
84
<br/>
84
85
85
86
| Annotation | PostgresSQL | MySQL | SQLite |
@@ -89,12 +90,160 @@ More info can be found in [here](https://docs.sqlc.dev/en/stable/reference/query
89
90
| sqlc.slice | 🚫 | ✅ | ✅ |
90
91
| sqlc.embed | ✅ | ✅ | ✅ |
91
92
92
-
- ✅ means the feature is fully supported.
93
-
- 🚫 means the database does not support the feature.
94
-
- ❌ means the feature is not supported by the plugin (but could be supported by the database).
95
-
96
93
More info can be found in [here](https://docs.sqlc.dev/en/stable/reference/macros.html#macros).
97
-
# Contributing
94
+
# PostgresSQL
95
+
## :execlastid - Implementation
96
+
Implemented via a `RETURNING` clause, allowing the `INSERT` command to return the newly created id, which can be of any
97
+
data type that can have a unique constraint.
98
+
99
+
## :copyfrom - Implementation
100
+
Implemented via the `COPY FROM` command which can load binary data directly from `stdin`.
101
+
102
+
## Data Types
103
+
Since in batch insert the data is not validated by the SQL itself but written in a binary format,
104
+
we consider support for the different data types separately for batch inserts and everything else.
0 commit comments