@@ -12,8 +12,8 @@ version: "2"
1212plugins :
1313- name : csharp
1414 wasm :
15- url : https://github.com/DaredevilOSS/sqlc-gen-csharp/releases/download/v0.18 .0/sqlc-gen-csharp.wasm
16- sha256 : 5564052d3133c4127c067b7528e2b62e78ccf03cb99c7fc2aade0764b9455125
15+ url : https://github.com/DaredevilOSS/sqlc-gen-csharp/releases/download/v0.19 .0/sqlc-gen-csharp.wasm
16+ sha256 : 82e1a2dfc44ba5052c1e310aa2cda82d2825b8dc57000ce4dd6519249e5ea0fe
1717sql :
1818 # For PostgresSQL
1919 - schema : schema.sql
5050| Override | values : A nested override value like [this](#override-option). | Yes | Allows you to override the generated C# data types for specific columns in specific queries. This option accepts a `query_name:column_name` mapping and the overriden data type. | |
5151
5252# ## Override option
53+ Override for a specific query :
5354` ` ` yaml
5455overrides:
5556 - column: "<query-name>:<field-name>"
@@ -58,6 +59,15 @@ overrides:
5859 notNull: true|false
5960` ` `
6061
62+ Override for all queries :
63+ ` ` ` yaml
64+ overrides:
65+ - column: "*:<field-name>"
66+ csharp_type:
67+ type: "<csharp-datatype>"
68+ notNull: true|false
69+ ` ` `
70+
6171# # Supported Features
6272- ✅ means the feature is fully supported.
6373- 🚫 means the database does not support the feature.
@@ -165,7 +175,7 @@ Since in batch insert the data is not validated by the SQL itself but written in
165175we consider support for the different data types separately for batch inserts and everything else.
166176
167177| DB Type | Supported? | Supported in Batch? |
168- |-----------------------------------------|-----------|--------------------- |
178+ |-----------------------------------------|------------ |-------------------- |
169179| boolean | ✅ | ✅ |
170180| smallint | ✅ | ✅ |
171181| integer | ✅ | ✅ |
@@ -177,32 +187,38 @@ we consider support for the different data types separately for batch inserts an
177187| timestamp, timestamp without time zone | ✅ | ✅ |
178188| timestamp with time zone | ✅ | ✅ |
179189| time, time without time zone | ✅ | ✅ |
180- | time with time zone | ❌ | ❌ |
181- | interval | ❌ | ❌ |
190+ | time with time zone | 🚫 | 🚫 |
191+ | interval | ✅ | ✅ |
182192| char | ✅ | ✅ |
183- | bpchar | ❌ | ❌ |
193+ | bpchar | ✅ | ✅ |
184194| varchar, character varying | ✅ | ✅ |
185195| text | ✅ | ✅ |
186196| bytea | ✅ | ✅ |
187197| 2-dimensional arrays (e.g text[],int[]) | ✅ | ❌ |
188198| money | ✅ | ✅ |
189- | point | ✅ | ❌ |
190- | line | ✅ | ❌ |
191- | lseg | ✅ | ❌ |
192- | box | ✅ | ❌ |
193- | path | ✅ | ❌ |
194- | polygon | ✅ | ❌ |
195- | circle | ✅ | ❌ |
196- | cidr | ❌ | ❌ |
197- | inet | ❌ | ❌ |
198- | macaddr | ❌ | ❌ |
199- | macaddr8 | ❌ | ❌ |
199+ | point | ✅ | ✅ |
200+ | line | ✅ | ✅ |
201+ | lseg | ✅ | ✅ |
202+ | box | ✅ | ✅ |
203+ | path | ✅ | ✅ |
204+ | polygon | ✅ | ✅ |
205+ | circle | ✅ | ✅ |
206+ | cidr | ✅ | ❌ |
207+ | inet | ✅ | ❌ |
208+ | macaddr | ✅ | ❌ |
209+ | macaddr8 | ✅ | ❌ |
200210| tsvector | ❌ | ❌ |
201211| tsquery | ❌ | ❌ |
202- | uuid | ❌ | ❌ |
203- | json | ❌ | ❌ |
204- | jsonb | ❌ | ❌ |
205- | jsonpath | ❌ | ❌ |
212+ | uuid | ✅ | ✅ |
213+ | json | ✅ | ❌ |
214+ | jsonb | ✅ | ❌ |
215+ | jsonpath | ✅ | ❌ |
216+ | xml | ❌ | ❌ |
217+ | enum | ❌ | ❌ |
218+
219+ *** `time with time zone` is not useful and not recommended to use by Postgres themselves -
220+ see [here](https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-DATETIME) -
221+ so we decided not to implement support for it.
206222
207223</details>
208224
@@ -277,9 +293,9 @@ we consider support for the different data types separately for batch inserts an
277293| blob | ✅ | ✅ |
278294| mediumblob | ✅ | ✅ |
279295| longblob | ✅ | ✅ |
280- | enum | ❌ | ❌ |
296+ | enum | ✅ | ✅ |
281297| set | ❌ | ❌ |
282- | json | ❌ | ❌ |
298+ | json | ✅ | ✅ |
283299| geometry | ❌ | ❌ |
284300| point | ❌ | ❌ |
285301| linestring | ❌ | ❌ |
@@ -405,6 +421,14 @@ overrides:
405421 csharp_type:
406422 type: "DateTime"
407423 notNull: true
424+ - column: "*:c_json_string_override"
425+ csharp_type:
426+ type: "string"
427+ notNull: false
428+ - column: "*:c_macaddr8"
429+ csharp_type:
430+ type: "string"
431+ notNull: false
408432```
409433
410434</details >
@@ -432,6 +456,14 @@ overrides:
432456 csharp_type :
433457 type : " DateTime"
434458 notNull : true
459+ - column : " *:c_json_string_override"
460+ csharp_type :
461+ type : " string"
462+ notNull : false
463+ - column : " *:c_macaddr8"
464+ csharp_type :
465+ type : " string"
466+ notNull : false
435467` ` `
436468
437469</details>
@@ -459,6 +491,14 @@ overrides:
459491 csharp_type:
460492 type: "DateTime"
461493 notNull: true
494+ - column: "*:c_json_string_override"
495+ csharp_type:
496+ type: "string"
497+ notNull: false
498+ - column: "*:c_macaddr8"
499+ csharp_type:
500+ type: "string"
501+ notNull: false
462502` ` `
463503
464504</details>
@@ -486,6 +526,14 @@ overrides:
486526 csharp_type:
487527 type: "DateTime"
488528 notNull: true
529+ - column: "*:c_json_string_override"
530+ csharp_type:
531+ type: "string"
532+ notNull: false
533+ - column: "*:c_macaddr8"
534+ csharp_type:
535+ type: "string"
536+ notNull: false
489537` ` `
490538
491539</details>
@@ -513,10 +561,10 @@ overrides:
513561 csharp_type:
514562 type: "DateTime"
515563 notNull: true
516- - column: "GetMysqlFunctions:max_bigint "
564+ - column: "*:c_json_string_override "
517565 csharp_type:
518- type: "long "
519- notNull: true
566+ type: "string "
567+ notNull: false
520568` ` `
521569
522570</details>
@@ -544,10 +592,10 @@ overrides:
544592 csharp_type:
545593 type: "DateTime"
546594 notNull: true
547- - column: "GetMysqlFunctions:max_bigint "
595+ - column: "*:c_json_string_override "
548596 csharp_type:
549- type: "long "
550- notNull: true
597+ type: "string "
598+ notNull: false
551599` ` `
552600
553601</details>
@@ -575,10 +623,10 @@ overrides:
575623 csharp_type:
576624 type: "DateTime"
577625 notNull: true
578- - column: "GetMysqlFunctions:max_bigint "
626+ - column: "*:c_json_string_override "
579627 csharp_type:
580- type: "long "
581- notNull: true
628+ type: "string "
629+ notNull: false
582630` ` `
583631
584632</details>
@@ -606,10 +654,10 @@ overrides:
606654 csharp_type:
607655 type: "DateTime"
608656 notNull: true
609- - column: "GetMysqlFunctions:max_bigint "
657+ - column: "*:c_json_string_override "
610658 csharp_type:
611- type: "long "
612- notNull: true
659+ type: "string "
660+ notNull: false
613661` ` `
614662
615663</details>
0 commit comments