Skip to content

Commit a989de9

Browse files
fix: added JSON support in batch mysql
1 parent ab1220b commit a989de9

23 files changed

Lines changed: 768 additions & 515 deletions

File tree

README.md

Lines changed: 111 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ we consider support for the different data types separately for batch inserts an
277277
| blob | ✅ | ✅ |
278278
| mediumblob | ✅ | ✅ |
279279
| longblob | ✅ | ✅ |
280-
| enum | | |
280+
| enum | | |
281281
| set | ❌ | ❌ |
282-
| json | | |
282+
| json | | |
283283
| geometry | ❌ | ❌ |
284284
| point | ❌ | ❌ |
285285
| linestring | ❌ | ❌ |
@@ -380,14 +380,14 @@ By default, the release script will bump the patch version. Adding `[release]` t
380380
381381
### Release structure
382382
The new created tag will create a draft release with it, in the release there will be the wasm plugin embedded in the release. <br/>
383-
# Examples
384-
<details>
385-
<summary>Npgsql</summary>
386-
387-
## Engine `postgresql`: [NpgsqlExample](examples/NpgsqlExample)
388-
### [Schema](examples/config/postgresql/schema.sql) | [Queries](examples/config/postgresql/query.sql) | [End2End Test](end2end/EndToEndTests/NpgsqlTester.cs)
389-
### Config
390-
```yaml
383+
# Examples
384+
<details>
385+
<summary>Npgsql</summary>
386+
387+
## Engine `postgresql`: [NpgsqlExample](examples/NpgsqlExample)
388+
### [Schema](examples/config/postgresql/schema.sql) | [Queries](examples/config/postgresql/query.sql) | [End2End Test](end2end/EndToEndTests/NpgsqlTester.cs)
389+
### Config
390+
```yaml
391391
useDapper: false
392392
targetFramework: net8.0
393393
generateCsproj: true
@@ -405,16 +405,16 @@ overrides:
405405
csharp_type:
406406
type: "DateTime"
407407
notNull: true
408-
```
409-
408+
```
409+
410410
</details>
411-
<details>
412-
<summary>NpgsqlDapper</summary>
413-
414-
## Engine `postgresql`: [NpgsqlDapperExample](examples/NpgsqlDapperExample)
415-
### [Schema](examples/config/postgresql/schema.sql) | [Queries](examples/config/postgresql/query.sql) | [End2End Test](end2end/EndToEndTests/NpgsqlDapperTester.cs)
416-
### Config
417-
```yaml
411+
<details>
412+
<summary>NpgsqlDapper</summary>
413+
414+
## Engine `postgresql`: [NpgsqlDapperExample](examples/NpgsqlDapperExample)
415+
### [Schema](examples/config/postgresql/schema.sql) | [Queries](examples/config/postgresql/query.sql) | [End2End Test](end2end/EndToEndTests/NpgsqlDapperTester.cs)
416+
### Config
417+
```yaml
418418
useDapper: true
419419
targetFramework: net8.0
420420
generateCsproj: true
@@ -432,16 +432,16 @@ overrides:
432432
csharp_type:
433433
type: "DateTime"
434434
notNull: true
435-
```
436-
435+
```
436+
437437
</details>
438-
<details>
439-
<summary>NpgsqlLegacy</summary>
440-
441-
## Engine `postgresql`: [NpgsqlLegacyExample](examples/NpgsqlLegacyExample)
442-
### [Schema](examples/config/postgresql/schema.sql) | [Queries](examples/config/postgresql/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/NpgsqlTester.cs)
443-
### Config
444-
```yaml
438+
<details>
439+
<summary>NpgsqlLegacy</summary>
440+
441+
## Engine `postgresql`: [NpgsqlLegacyExample](examples/NpgsqlLegacyExample)
442+
### [Schema](examples/config/postgresql/schema.sql) | [Queries](examples/config/postgresql/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/NpgsqlTester.cs)
443+
### Config
444+
```yaml
445445
useDapper: false
446446
targetFramework: netstandard2.0
447447
generateCsproj: true
@@ -459,16 +459,16 @@ overrides:
459459
csharp_type:
460460
type: "DateTime"
461461
notNull: true
462-
```
463-
462+
```
463+
464464
</details>
465-
<details>
466-
<summary>NpgsqlDapperLegacy</summary>
467-
468-
## Engine `postgresql`: [NpgsqlDapperLegacyExample](examples/NpgsqlDapperLegacyExample)
469-
### [Schema](examples/config/postgresql/schema.sql) | [Queries](examples/config/postgresql/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/NpgsqlDapperTester.cs)
470-
### Config
471-
```yaml
465+
<details>
466+
<summary>NpgsqlDapperLegacy</summary>
467+
468+
## Engine `postgresql`: [NpgsqlDapperLegacyExample](examples/NpgsqlDapperLegacyExample)
469+
### [Schema](examples/config/postgresql/schema.sql) | [Queries](examples/config/postgresql/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/NpgsqlDapperTester.cs)
470+
### Config
471+
```yaml
472472
useDapper: true
473473
targetFramework: netstandard2.0
474474
generateCsproj: true
@@ -486,16 +486,16 @@ overrides:
486486
csharp_type:
487487
type: "DateTime"
488488
notNull: true
489-
```
490-
489+
```
490+
491491
</details>
492-
<details>
493-
<summary>MySqlConnector</summary>
494-
495-
## Engine `mysql`: [MySqlConnectorExample](examples/MySqlConnectorExample)
496-
### [Schema](examples/config/mysql/schema.sql) | [Queries](examples/config/mysql/query.sql) | [End2End Test](end2end/EndToEndTests/MySqlConnectorTester.cs)
497-
### Config
498-
```yaml
492+
<details>
493+
<summary>MySqlConnector</summary>
494+
495+
## Engine `mysql`: [MySqlConnectorExample](examples/MySqlConnectorExample)
496+
### [Schema](examples/config/mysql/schema.sql) | [Queries](examples/config/mysql/query.sql) | [End2End Test](end2end/EndToEndTests/MySqlConnectorTester.cs)
497+
### Config
498+
```yaml
499499
useDapper: false
500500
targetFramework: net8.0
501501
generateCsproj: true
@@ -517,16 +517,16 @@ overrides:
517517
csharp_type:
518518
type: "long"
519519
notNull: true
520-
```
521-
520+
```
521+
522522
</details>
523-
<details>
524-
<summary>MySqlConnectorDapper</summary>
525-
526-
## Engine `mysql`: [MySqlConnectorDapperExample](examples/MySqlConnectorDapperExample)
527-
### [Schema](examples/config/mysql/schema.sql) | [Queries](examples/config/mysql/query.sql) | [End2End Test](end2end/EndToEndTests/MySqlConnectorDapperTester.cs)
528-
### Config
529-
```yaml
523+
<details>
524+
<summary>MySqlConnectorDapper</summary>
525+
526+
## Engine `mysql`: [MySqlConnectorDapperExample](examples/MySqlConnectorDapperExample)
527+
### [Schema](examples/config/mysql/schema.sql) | [Queries](examples/config/mysql/query.sql) | [End2End Test](end2end/EndToEndTests/MySqlConnectorDapperTester.cs)
528+
### Config
529+
```yaml
530530
useDapper: true
531531
targetFramework: net8.0
532532
generateCsproj: true
@@ -548,16 +548,16 @@ overrides:
548548
csharp_type:
549549
type: "long"
550550
notNull: true
551-
```
552-
551+
```
552+
553553
</details>
554-
<details>
555-
<summary>MySqlConnectorLegacy</summary>
556-
557-
## Engine `mysql`: [MySqlConnectorLegacyExample](examples/MySqlConnectorLegacyExample)
558-
### [Schema](examples/config/mysql/schema.sql) | [Queries](examples/config/mysql/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/MySqlConnectorTester.cs)
559-
### Config
560-
```yaml
554+
<details>
555+
<summary>MySqlConnectorLegacy</summary>
556+
557+
## Engine `mysql`: [MySqlConnectorLegacyExample](examples/MySqlConnectorLegacyExample)
558+
### [Schema](examples/config/mysql/schema.sql) | [Queries](examples/config/mysql/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/MySqlConnectorTester.cs)
559+
### Config
560+
```yaml
561561
useDapper: false
562562
targetFramework: netstandard2.0
563563
generateCsproj: true
@@ -579,16 +579,16 @@ overrides:
579579
csharp_type:
580580
type: "long"
581581
notNull: true
582-
```
583-
582+
```
583+
584584
</details>
585-
<details>
586-
<summary>MySqlConnectorDapperLegacy</summary>
587-
588-
## Engine `mysql`: [MySqlConnectorDapperLegacyExample](examples/MySqlConnectorDapperLegacyExample)
589-
### [Schema](examples/config/mysql/schema.sql) | [Queries](examples/config/mysql/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.cs)
590-
### Config
591-
```yaml
585+
<details>
586+
<summary>MySqlConnectorDapperLegacy</summary>
587+
588+
## Engine `mysql`: [MySqlConnectorDapperLegacyExample](examples/MySqlConnectorDapperLegacyExample)
589+
### [Schema](examples/config/mysql/schema.sql) | [Queries](examples/config/mysql/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.cs)
590+
### Config
591+
```yaml
592592
useDapper: true
593593
targetFramework: netstandard2.0
594594
generateCsproj: true
@@ -610,16 +610,16 @@ overrides:
610610
csharp_type:
611611
type: "long"
612612
notNull: true
613-
```
614-
613+
```
614+
615615
</details>
616-
<details>
617-
<summary>Sqlite</summary>
618-
619-
## Engine `sqlite`: [SqliteExample](examples/SqliteExample)
620-
### [Schema](examples/config/sqlite/schema.sql) | [Queries](examples/config/sqlite/query.sql) | [End2End Test](end2end/EndToEndTests/SqliteTester.cs)
621-
### Config
622-
```yaml
616+
<details>
617+
<summary>Sqlite</summary>
618+
619+
## Engine `sqlite`: [SqliteExample](examples/SqliteExample)
620+
### [Schema](examples/config/sqlite/schema.sql) | [Queries](examples/config/sqlite/query.sql) | [End2End Test](end2end/EndToEndTests/SqliteTester.cs)
621+
### Config
622+
```yaml
623623
useDapper: false
624624
targetFramework: net8.0
625625
generateCsproj: true
@@ -637,16 +637,16 @@ overrides:
637637
csharp_type:
638638
type: "decimal"
639639
notNull: true
640-
```
641-
640+
```
641+
642642
</details>
643-
<details>
644-
<summary>SqliteDapper</summary>
645-
646-
## Engine `sqlite`: [SqliteDapperExample](examples/SqliteDapperExample)
647-
### [Schema](examples/config/sqlite/schema.sql) | [Queries](examples/config/sqlite/query.sql) | [End2End Test](end2end/EndToEndTests/SqliteDapperTester.cs)
648-
### Config
649-
```yaml
643+
<details>
644+
<summary>SqliteDapper</summary>
645+
646+
## Engine `sqlite`: [SqliteDapperExample](examples/SqliteDapperExample)
647+
### [Schema](examples/config/sqlite/schema.sql) | [Queries](examples/config/sqlite/query.sql) | [End2End Test](end2end/EndToEndTests/SqliteDapperTester.cs)
648+
### Config
649+
```yaml
650650
useDapper: true
651651
targetFramework: net8.0
652652
generateCsproj: true
@@ -664,16 +664,16 @@ overrides:
664664
csharp_type:
665665
type: "decimal"
666666
notNull: true
667-
```
668-
667+
```
668+
669669
</details>
670-
<details>
671-
<summary>SqliteLegacy</summary>
672-
673-
## Engine `sqlite`: [SqliteLegacyExample](examples/SqliteLegacyExample)
674-
### [Schema](examples/config/sqlite/schema.sql) | [Queries](examples/config/sqlite/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/SqliteTester.cs)
675-
### Config
676-
```yaml
670+
<details>
671+
<summary>SqliteLegacy</summary>
672+
673+
## Engine `sqlite`: [SqliteLegacyExample](examples/SqliteLegacyExample)
674+
### [Schema](examples/config/sqlite/schema.sql) | [Queries](examples/config/sqlite/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/SqliteTester.cs)
675+
### Config
676+
```yaml
677677
useDapper: false
678678
targetFramework: netstandard2.0
679679
generateCsproj: true
@@ -691,16 +691,16 @@ overrides:
691691
csharp_type:
692692
type: "decimal"
693693
notNull: true
694-
```
695-
694+
```
695+
696696
</details>
697-
<details>
698-
<summary>SqliteDapperLegacy</summary>
699-
700-
## Engine `sqlite`: [SqliteDapperLegacyExample](examples/SqliteDapperLegacyExample)
701-
### [Schema](examples/config/sqlite/schema.sql) | [Queries](examples/config/sqlite/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/SqliteDapperTester.cs)
702-
### Config
703-
```yaml
697+
<details>
698+
<summary>SqliteDapperLegacy</summary>
699+
700+
## Engine `sqlite`: [SqliteDapperLegacyExample](examples/SqliteDapperLegacyExample)
701+
### [Schema](examples/config/sqlite/schema.sql) | [Queries](examples/config/sqlite/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/SqliteDapperTester.cs)
702+
### Config
703+
```yaml
704704
useDapper: true
705705
targetFramework: netstandard2.0
706706
generateCsproj: true
@@ -718,6 +718,6 @@ overrides:
718718
csharp_type:
719719
type: "decimal"
720720
notNull: true
721-
```
722-
721+
```
722+
723723
</details>

end2end/EndToEndScaffold/Config.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public enum KnownTestType
6565
MySqlDataTypesOverride,
6666
MySqlScopedSchemaEnum,
6767
MySqlJsonDataTypes,
68+
MySqlJsonCopyFrom,
6869

6970
MySqlStringCopyFrom,
7071
MySqlIntegerCopyFrom,
@@ -107,6 +108,7 @@ internal static class Config
107108
KnownTestType.MySqlEnumDataType,
108109
KnownTestType.MySqlScopedSchemaEnum,
109110
KnownTestType.MySqlJsonDataTypes,
111+
KnownTestType.MySqlJsonCopyFrom,
110112
KnownTestType.MySqlDataTypesOverride,
111113

112114
KnownTestType.MySqlStringCopyFrom,
@@ -146,6 +148,7 @@ internal static class Config
146148
KnownTestType.MySqlEnumDataType,
147149
KnownTestType.MySqlScopedSchemaEnum,
148150
KnownTestType.MySqlJsonDataTypes,
151+
KnownTestType.MySqlJsonCopyFrom,
149152
KnownTestType.MySqlDataTypesOverride,
150153

151154
KnownTestType.MySqlStringCopyFrom,

0 commit comments

Comments
 (0)