From 8b83922f4654bf2a8e9b5d0c06de79842cea0891 Mon Sep 17 00:00:00 2001 From: SockworkOrange <26390445+SockworkOrange@users.noreply.github.com> Date: Sat, 3 Jan 2026 17:02:19 +0000 Subject: [PATCH 1/3] update docs --- README.md | 82 +++---- docs/08_Examples.md | 557 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 588 insertions(+), 51 deletions(-) create mode 100644 docs/08_Examples.md diff --git a/README.md b/README.md index a9491254..81088cd4 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,6 @@ public async Task ExampleTransaction(IDbConnection connection) ``` More info can be found in [here](https://docs.sqlc.dev/en/stable/howto/transactions.html). - # PostgresSQL
:execlastid - Implementation @@ -245,7 +244,6 @@ INSERT INTO tab1 (macaddr8_field) VALUES (sqlc.narg('macaddr8_field')::macaddr8) ```
- # MySQL
:execlastid - Implementation @@ -330,7 +328,6 @@ we consider support for the different data types separately for batch inserts an | geometrycollection | ⚠️ | ⚠️ |
- # SQLite3
:execlastid - Implementation @@ -403,6 +400,7 @@ amount of data types that are supported by SQLite. The supported overrides are s
[SQLite - Writes](https://github.com/DaredevilOSS/sqlc-gen-csharp/blob/main/benchmark/BenchmarkDotNet.Artifacts/sqlite/writes/results/BenchmarkRunner.Benchmarks.SqliteWriteBenchmark-report-github.md) + # Contributing ## Local plugin development ### Prerequisites @@ -463,7 +461,8 @@ The new created tag will create a draft release with it, in the release there wi ```yaml ``` -
+ +
QuickStartMySqlDalGen @@ -473,7 +472,8 @@ The new created tag will create a draft release with it, in the release there wi ```yaml ``` -
+ +
QuickStartSqliteDalGen @@ -483,7 +483,8 @@ The new created tag will create a draft release with it, in the release there wi ```yaml ``` -
+ +
Npgsql @@ -534,7 +535,8 @@ overrides: notNull: false ``` -
+ +
NpgsqlDapper @@ -585,7 +587,8 @@ overrides: notNull: false ``` -
+ +
NpgsqlLegacy @@ -636,7 +639,8 @@ overrides: notNull: false ``` -
+ +
NpgsqlDapperLegacy @@ -687,7 +691,8 @@ overrides: notNull: false ``` -
+ +
MySqlConnector @@ -722,7 +727,8 @@ overrides: notNull: false ``` -
+ +
MySqlConnectorDapper @@ -757,7 +763,8 @@ overrides: notNull: false ``` -
+ +
MySqlConnectorLegacy @@ -792,7 +799,8 @@ overrides: notNull: false ``` -
+ +
MySqlConnectorDapperLegacy @@ -827,7 +835,8 @@ overrides: notNull: false ``` -
+ +
Sqlite @@ -869,7 +878,8 @@ overrides: type: "Instant" ``` -
+ +
SqliteDapper @@ -911,7 +921,8 @@ overrides: type: "Instant" ``` -
+ +
SqliteLegacy @@ -953,7 +964,8 @@ overrides: type: "Instant" ``` -
+ +
SqliteDapperLegacy @@ -995,40 +1007,8 @@ overrides: type: "Instant" ``` -
-
-benchmark/PostgresqlSqlcImpl - -## Engine `postgresql`: [benchmark/PostgresqlSqlcImpl](benchmark/PostgresqlSqlcImpl) -### [Schema](examples/config/postgresql/benchmark/schema.sql) | [Queries](examples/config/postgresql/benchmark/query.sql) | [End2End Test](end2end/EndToEndTests/benchmark/PostgresqlSqlcImpl.cs) -### Config -```yaml -namespaceName: PostgresSqlcImpl -``` - -
-
-benchmark/SqliteSqlcImpl - -## Engine `sqlite`: [benchmark/SqliteSqlcImpl](benchmark/SqliteSqlcImpl) -### [Schema](examples/config/sqlite/benchmark/schema.sql) | [Queries](examples/config/sqlite/benchmark/query.sql) | [End2End Test](end2end/EndToEndTests/benchmark/SqliteSqlcImpl.cs) -### Config -```yaml -namespaceName: SqliteSqlcImpl -``` - -
-
-benchmark/MysqlSqlcImpl - -## Engine `mysql`: [benchmark/MysqlSqlcImpl](benchmark/MysqlSqlcImpl) -### [Schema](examples/config/mysql/benchmark/schema.sql) | [Queries](examples/config/mysql/benchmark/query.sql) | [End2End Test](end2end/EndToEndTests/benchmark/MysqlSqlcImpl.cs) -### Config -```yaml -namespaceName: MysqlSqlcImpl -``` - -
# Examples + +# Examples
QuickStartPostgresDalGen diff --git a/docs/08_Examples.md b/docs/08_Examples.md new file mode 100644 index 00000000..a6ae5bf5 --- /dev/null +++ b/docs/08_Examples.md @@ -0,0 +1,557 @@ +# Examples +
+QuickStartPostgresDalGen + +## Engine `postgresql`: [QuickStartPostgresDalGen](examples/QuickStartPostgresDalGen) +### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/QuickStartPostgresDalGen.cs) +### Config +```yaml +``` + +
+ +
+QuickStartMySqlDalGen + +## Engine `mysql`: [QuickStartMySqlDalGen](examples/QuickStartMySqlDalGen) +### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/QuickStartMySqlDalGen.cs) +### Config +```yaml +``` + +
+ +
+QuickStartSqliteDalGen + +## Engine `sqlite`: [QuickStartSqliteDalGen](examples/QuickStartSqliteDalGen) +### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTests/QuickStartSqliteDalGen.cs) +### Config +```yaml +``` + +
+ +
+Npgsql + +## Engine `postgresql`: [NpgsqlExample](examples/NpgsqlExample) +### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/NpgsqlTester.cs) +### Config +```yaml +useDapper: false +targetFramework: net8.0 +generateCsproj: true +namespaceName: NpgsqlExampleGen +overrides: +- column: "GetPostgresFunctions:max_integer" + csharp_type: + type: "int" + notNull: false +- column: "GetPostgresFunctions:max_varchar" + csharp_type: + type: "string" + notNull: false +- column: "GetPostgresFunctions:max_timestamp" + csharp_type: + type: "DateTime" + notNull: true +- column: "GetPostgresSpecialTypesCnt:c_json" + csharp_type: + type: "JsonElement" + notNull: false +- column: "GetPostgresSpecialTypesCnt:c_jsonb" + csharp_type: + type: "JsonElement" + notNull: false +- column: "*:c_json_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_xml_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_macaddr8" + csharp_type: + type: "string" + notNull: false +- column: "*:c_timestamp_noda_instant_override" + csharp_type: + type: "Instant" + notNull: false +``` + +
+ +
+NpgsqlDapper + +## Engine `postgresql`: [NpgsqlDapperExample](examples/NpgsqlDapperExample) +### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/NpgsqlDapperTester.cs) +### Config +```yaml +useDapper: true +targetFramework: net8.0 +generateCsproj: true +namespaceName: NpgsqlDapperExampleGen +overrides: +- column: "GetPostgresFunctions:max_integer" + csharp_type: + type: "int" + notNull: false +- column: "GetPostgresFunctions:max_varchar" + csharp_type: + type: "string" + notNull: false +- column: "GetPostgresFunctions:max_timestamp" + csharp_type: + type: "DateTime" + notNull: true +- column: "GetPostgresSpecialTypesCnt:c_json" + csharp_type: + type: "JsonElement" + notNull: false +- column: "GetPostgresSpecialTypesCnt:c_jsonb" + csharp_type: + type: "JsonElement" + notNull: false +- column: "*:c_json_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_xml_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_macaddr8" + csharp_type: + type: "string" + notNull: false +- column: "*:c_timestamp_noda_instant_override" + csharp_type: + type: "Instant" + notNull: false +``` + +
+ +
+NpgsqlLegacy + +## Engine `postgresql`: [NpgsqlLegacyExample](examples/NpgsqlLegacyExample) +### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/NpgsqlTester.cs) +### Config +```yaml +useDapper: false +targetFramework: netstandard2.0 +generateCsproj: true +namespaceName: NpgsqlLegacyExampleGen +overrides: +- column: "GetPostgresFunctions:max_integer" + csharp_type: + type: "int" + notNull: false +- column: "GetPostgresFunctions:max_varchar" + csharp_type: + type: "string" + notNull: false +- column: "GetPostgresFunctions:max_timestamp" + csharp_type: + type: "DateTime" + notNull: true +- column: "GetPostgresSpecialTypesCnt:c_json" + csharp_type: + type: "JsonElement" + notNull: false +- column: "GetPostgresSpecialTypesCnt:c_jsonb" + csharp_type: + type: "JsonElement" + notNull: false +- column: "*:c_json_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_xml_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_macaddr8" + csharp_type: + type: "string" + notNull: false +- column: "*:c_timestamp_noda_instant_override" + csharp_type: + type: "Instant" + notNull: false +``` + +
+ +
+NpgsqlDapperLegacy + +## Engine `postgresql`: [NpgsqlDapperLegacyExample](examples/NpgsqlDapperLegacyExample) +### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/NpgsqlDapperTester.cs) +### Config +```yaml +useDapper: true +targetFramework: netstandard2.0 +generateCsproj: true +namespaceName: NpgsqlDapperLegacyExampleGen +overrides: +- column: "GetPostgresFunctions:max_integer" + csharp_type: + type: "int" + notNull: false +- column: "GetPostgresFunctions:max_varchar" + csharp_type: + type: "string" + notNull: false +- column: "GetPostgresFunctions:max_timestamp" + csharp_type: + type: "DateTime" + notNull: true +- column: "GetPostgresSpecialTypesCnt:c_json" + csharp_type: + type: "JsonElement" + notNull: false +- column: "GetPostgresSpecialTypesCnt:c_jsonb" + csharp_type: + type: "JsonElement" + notNull: false +- column: "*:c_json_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_xml_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_macaddr8" + csharp_type: + type: "string" + notNull: false +- column: "*:c_timestamp_noda_instant_override" + csharp_type: + type: "Instant" + notNull: false +``` + +
+ +
+MySqlConnector + +## Engine `mysql`: [MySqlConnectorExample](examples/MySqlConnectorExample) +### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/MySqlConnectorTester.cs) +### Config +```yaml +useDapper: false +targetFramework: net8.0 +generateCsproj: true +namespaceName: MySqlConnectorExampleGen +overrides: +- column: "GetMysqlFunctions:max_int" + csharp_type: + type: "int" + notNull: false +- column: "GetMysqlFunctions:max_varchar" + csharp_type: + type: "string" + notNull: false +- column: "GetMysqlFunctions:max_timestamp" + csharp_type: + type: "DateTime" + notNull: true +- column: "*:c_json_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_timestamp_noda_instant_override" + csharp_type: + type: "Instant" + notNull: false +``` + +
+ +
+MySqlConnectorDapper + +## Engine `mysql`: [MySqlConnectorDapperExample](examples/MySqlConnectorDapperExample) +### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/MySqlConnectorDapperTester.cs) +### Config +```yaml +useDapper: true +targetFramework: net8.0 +generateCsproj: true +namespaceName: MySqlConnectorDapperExampleGen +overrides: +- column: "GetMysqlFunctions:max_int" + csharp_type: + type: "int" + notNull: false +- column: "GetMysqlFunctions:max_varchar" + csharp_type: + type: "string" + notNull: false +- column: "GetMysqlFunctions:max_timestamp" + csharp_type: + type: "DateTime" + notNull: true +- column: "*:c_json_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_timestamp_noda_instant_override" + csharp_type: + type: "Instant" + notNull: false +``` + +
+ +
+MySqlConnectorLegacy + +## Engine `mysql`: [MySqlConnectorLegacyExample](examples/MySqlConnectorLegacyExample) +### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/MySqlConnectorTester.cs) +### Config +```yaml +useDapper: false +targetFramework: netstandard2.0 +generateCsproj: true +namespaceName: MySqlConnectorLegacyExampleGen +overrides: +- column: "GetMysqlFunctions:max_int" + csharp_type: + type: "int" + notNull: false +- column: "GetMysqlFunctions:max_varchar" + csharp_type: + type: "string" + notNull: false +- column: "GetMysqlFunctions:max_timestamp" + csharp_type: + type: "DateTime" + notNull: true +- column: "*:c_json_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_timestamp_noda_instant_override" + csharp_type: + type: "Instant" + notNull: false +``` + +
+ +
+MySqlConnectorDapperLegacy + +## Engine `mysql`: [MySqlConnectorDapperLegacyExample](examples/MySqlConnectorDapperLegacyExample) +### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.cs) +### Config +```yaml +useDapper: true +targetFramework: netstandard2.0 +generateCsproj: true +namespaceName: MySqlConnectorDapperLegacyExampleGen +overrides: +- column: "GetMysqlFunctions:max_int" + csharp_type: + type: "int" + notNull: false +- column: "GetMysqlFunctions:max_varchar" + csharp_type: + type: "string" + notNull: false +- column: "GetMysqlFunctions:max_timestamp" + csharp_type: + type: "DateTime" + notNull: true +- column: "*:c_json_string_override" + csharp_type: + type: "string" + notNull: false +- column: "*:c_timestamp_noda_instant_override" + csharp_type: + type: "Instant" + notNull: false +``` + +
+ +
+Sqlite + +## Engine `sqlite`: [SqliteExample](examples/SqliteExample) +### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTests/SqliteTester.cs) +### Config +```yaml +useDapper: false +targetFramework: net8.0 +generateCsproj: true +namespaceName: SqliteExampleGen +overrides: +- column: "GetSqliteFunctions:max_integer" + csharp_type: + type: "int" +- column: "GetSqliteFunctions:max_varchar" + csharp_type: + type: "string" +- column: "GetSqliteFunctions:max_real" + csharp_type: + type: "decimal" +- column: "*:c_text_datetime_override" + csharp_type: + type: "DateTime" +- column: "*:c_integer_datetime_override" + csharp_type: + type: "DateTime" +- column: "*:c_text_bool_override" + csharp_type: + type: "bool" +- column: "*:c_integer_bool_override" + csharp_type: + type: "bool" +- column: "*:c_text_noda_instant_override" + csharp_type: + type: "Instant" +- column: "*:c_integer_noda_instant_override" + csharp_type: + type: "Instant" +``` + +
+ +
+SqliteDapper + +## Engine `sqlite`: [SqliteDapperExample](examples/SqliteDapperExample) +### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTests/SqliteDapperTester.cs) +### Config +```yaml +useDapper: true +targetFramework: net8.0 +generateCsproj: true +namespaceName: SqliteDapperExampleGen +overrides: +- column: "GetSqliteFunctions:max_integer" + csharp_type: + type: "int" +- column: "GetSqliteFunctions:max_varchar" + csharp_type: + type: "string" +- column: "GetSqliteFunctions:max_real" + csharp_type: + type: "decimal" +- column: "*:c_text_datetime_override" + csharp_type: + type: "DateTime" +- column: "*:c_integer_datetime_override" + csharp_type: + type: "DateTime" +- column: "*:c_text_bool_override" + csharp_type: + type: "bool" +- column: "*:c_integer_bool_override" + csharp_type: + type: "bool" +- column: "*:c_text_noda_instant_override" + csharp_type: + type: "Instant" +- column: "*:c_integer_noda_instant_override" + csharp_type: + type: "Instant" +``` + +
+ +
+SqliteLegacy + +## Engine `sqlite`: [SqliteLegacyExample](examples/SqliteLegacyExample) +### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/SqliteTester.cs) +### Config +```yaml +useDapper: false +targetFramework: netstandard2.0 +generateCsproj: true +namespaceName: SqliteLegacyExampleGen +overrides: +- column: "GetSqliteFunctions:max_integer" + csharp_type: + type: "int" +- column: "GetSqliteFunctions:max_varchar" + csharp_type: + type: "string" +- column: "GetSqliteFunctions:max_real" + csharp_type: + type: "decimal" +- column: "*:c_text_datetime_override" + csharp_type: + type: "DateTime" +- column: "*:c_integer_datetime_override" + csharp_type: + type: "DateTime" +- column: "*:c_text_bool_override" + csharp_type: + type: "bool" +- column: "*:c_integer_bool_override" + csharp_type: + type: "bool" +- column: "*:c_text_noda_instant_override" + csharp_type: + type: "Instant" +- column: "*:c_integer_noda_instant_override" + csharp_type: + type: "Instant" +``` + +
+ +
+SqliteDapperLegacy + +## Engine `sqlite`: [SqliteDapperLegacyExample](examples/SqliteDapperLegacyExample) +### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/SqliteDapperTester.cs) +### Config +```yaml +useDapper: true +targetFramework: netstandard2.0 +generateCsproj: true +namespaceName: SqliteDapperLegacyExampleGen +overrides: +- column: "GetSqliteFunctions:max_integer" + csharp_type: + type: "int" +- column: "GetSqliteFunctions:max_varchar" + csharp_type: + type: "string" +- column: "GetSqliteFunctions:max_real" + csharp_type: + type: "decimal" +- column: "*:c_text_datetime_override" + csharp_type: + type: "DateTime" +- column: "*:c_integer_datetime_override" + csharp_type: + type: "DateTime" +- column: "*:c_text_bool_override" + csharp_type: + type: "bool" +- column: "*:c_integer_bool_override" + csharp_type: + type: "bool" +- column: "*:c_text_noda_instant_override" + csharp_type: + type: "Instant" +- column: "*:c_integer_noda_instant_override" + csharp_type: + type: "Instant" +``` + +
From 905982bf7ad790179a61af3c62ca16491bb088d9 Mon Sep 17 00:00:00 2001 From: Ilan Uzan Date: Sat, 3 Jan 2026 18:03:51 +0100 Subject: [PATCH 2/3] fix: generate all docs script --- docs/08_Examples.md | 557 ------------------------------ docs/scripts/generate_all_docs.sh | 2 +- 2 files changed, 1 insertion(+), 558 deletions(-) delete mode 100644 docs/08_Examples.md diff --git a/docs/08_Examples.md b/docs/08_Examples.md deleted file mode 100644 index a6ae5bf5..00000000 --- a/docs/08_Examples.md +++ /dev/null @@ -1,557 +0,0 @@ -# Examples -
-QuickStartPostgresDalGen - -## Engine `postgresql`: [QuickStartPostgresDalGen](examples/QuickStartPostgresDalGen) -### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/QuickStartPostgresDalGen.cs) -### Config -```yaml -``` - -
- -
-QuickStartMySqlDalGen - -## Engine `mysql`: [QuickStartMySqlDalGen](examples/QuickStartMySqlDalGen) -### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/QuickStartMySqlDalGen.cs) -### Config -```yaml -``` - -
- -
-QuickStartSqliteDalGen - -## Engine `sqlite`: [QuickStartSqliteDalGen](examples/QuickStartSqliteDalGen) -### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTests/QuickStartSqliteDalGen.cs) -### Config -```yaml -``` - -
- -
-Npgsql - -## Engine `postgresql`: [NpgsqlExample](examples/NpgsqlExample) -### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/NpgsqlTester.cs) -### Config -```yaml -useDapper: false -targetFramework: net8.0 -generateCsproj: true -namespaceName: NpgsqlExampleGen -overrides: -- column: "GetPostgresFunctions:max_integer" - csharp_type: - type: "int" - notNull: false -- column: "GetPostgresFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetPostgresFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "GetPostgresSpecialTypesCnt:c_json" - csharp_type: - type: "JsonElement" - notNull: false -- column: "GetPostgresSpecialTypesCnt:c_jsonb" - csharp_type: - type: "JsonElement" - notNull: false -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_xml_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_macaddr8" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
- -
-NpgsqlDapper - -## Engine `postgresql`: [NpgsqlDapperExample](examples/NpgsqlDapperExample) -### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/NpgsqlDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: net8.0 -generateCsproj: true -namespaceName: NpgsqlDapperExampleGen -overrides: -- column: "GetPostgresFunctions:max_integer" - csharp_type: - type: "int" - notNull: false -- column: "GetPostgresFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetPostgresFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "GetPostgresSpecialTypesCnt:c_json" - csharp_type: - type: "JsonElement" - notNull: false -- column: "GetPostgresSpecialTypesCnt:c_jsonb" - csharp_type: - type: "JsonElement" - notNull: false -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_xml_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_macaddr8" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
- -
-NpgsqlLegacy - -## Engine `postgresql`: [NpgsqlLegacyExample](examples/NpgsqlLegacyExample) -### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/NpgsqlTester.cs) -### Config -```yaml -useDapper: false -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: NpgsqlLegacyExampleGen -overrides: -- column: "GetPostgresFunctions:max_integer" - csharp_type: - type: "int" - notNull: false -- column: "GetPostgresFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetPostgresFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "GetPostgresSpecialTypesCnt:c_json" - csharp_type: - type: "JsonElement" - notNull: false -- column: "GetPostgresSpecialTypesCnt:c_jsonb" - csharp_type: - type: "JsonElement" - notNull: false -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_xml_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_macaddr8" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
- -
-NpgsqlDapperLegacy - -## Engine `postgresql`: [NpgsqlDapperLegacyExample](examples/NpgsqlDapperLegacyExample) -### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/NpgsqlDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: NpgsqlDapperLegacyExampleGen -overrides: -- column: "GetPostgresFunctions:max_integer" - csharp_type: - type: "int" - notNull: false -- column: "GetPostgresFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetPostgresFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "GetPostgresSpecialTypesCnt:c_json" - csharp_type: - type: "JsonElement" - notNull: false -- column: "GetPostgresSpecialTypesCnt:c_jsonb" - csharp_type: - type: "JsonElement" - notNull: false -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_xml_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_macaddr8" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
- -
-MySqlConnector - -## Engine `mysql`: [MySqlConnectorExample](examples/MySqlConnectorExample) -### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/MySqlConnectorTester.cs) -### Config -```yaml -useDapper: false -targetFramework: net8.0 -generateCsproj: true -namespaceName: MySqlConnectorExampleGen -overrides: -- column: "GetMysqlFunctions:max_int" - csharp_type: - type: "int" - notNull: false -- column: "GetMysqlFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetMysqlFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
- -
-MySqlConnectorDapper - -## Engine `mysql`: [MySqlConnectorDapperExample](examples/MySqlConnectorDapperExample) -### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/MySqlConnectorDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: net8.0 -generateCsproj: true -namespaceName: MySqlConnectorDapperExampleGen -overrides: -- column: "GetMysqlFunctions:max_int" - csharp_type: - type: "int" - notNull: false -- column: "GetMysqlFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetMysqlFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
- -
-MySqlConnectorLegacy - -## Engine `mysql`: [MySqlConnectorLegacyExample](examples/MySqlConnectorLegacyExample) -### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/MySqlConnectorTester.cs) -### Config -```yaml -useDapper: false -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: MySqlConnectorLegacyExampleGen -overrides: -- column: "GetMysqlFunctions:max_int" - csharp_type: - type: "int" - notNull: false -- column: "GetMysqlFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetMysqlFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
- -
-MySqlConnectorDapperLegacy - -## Engine `mysql`: [MySqlConnectorDapperLegacyExample](examples/MySqlConnectorDapperLegacyExample) -### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: MySqlConnectorDapperLegacyExampleGen -overrides: -- column: "GetMysqlFunctions:max_int" - csharp_type: - type: "int" - notNull: false -- column: "GetMysqlFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetMysqlFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
- -
-Sqlite - -## Engine `sqlite`: [SqliteExample](examples/SqliteExample) -### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTests/SqliteTester.cs) -### Config -```yaml -useDapper: false -targetFramework: net8.0 -generateCsproj: true -namespaceName: SqliteExampleGen -overrides: -- column: "GetSqliteFunctions:max_integer" - csharp_type: - type: "int" -- column: "GetSqliteFunctions:max_varchar" - csharp_type: - type: "string" -- column: "GetSqliteFunctions:max_real" - csharp_type: - type: "decimal" -- column: "*:c_text_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_integer_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_text_bool_override" - csharp_type: - type: "bool" -- column: "*:c_integer_bool_override" - csharp_type: - type: "bool" -- column: "*:c_text_noda_instant_override" - csharp_type: - type: "Instant" -- column: "*:c_integer_noda_instant_override" - csharp_type: - type: "Instant" -``` - -
- -
-SqliteDapper - -## Engine `sqlite`: [SqliteDapperExample](examples/SqliteDapperExample) -### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTests/SqliteDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: net8.0 -generateCsproj: true -namespaceName: SqliteDapperExampleGen -overrides: -- column: "GetSqliteFunctions:max_integer" - csharp_type: - type: "int" -- column: "GetSqliteFunctions:max_varchar" - csharp_type: - type: "string" -- column: "GetSqliteFunctions:max_real" - csharp_type: - type: "decimal" -- column: "*:c_text_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_integer_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_text_bool_override" - csharp_type: - type: "bool" -- column: "*:c_integer_bool_override" - csharp_type: - type: "bool" -- column: "*:c_text_noda_instant_override" - csharp_type: - type: "Instant" -- column: "*:c_integer_noda_instant_override" - csharp_type: - type: "Instant" -``` - -
- -
-SqliteLegacy - -## Engine `sqlite`: [SqliteLegacyExample](examples/SqliteLegacyExample) -### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/SqliteTester.cs) -### Config -```yaml -useDapper: false -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: SqliteLegacyExampleGen -overrides: -- column: "GetSqliteFunctions:max_integer" - csharp_type: - type: "int" -- column: "GetSqliteFunctions:max_varchar" - csharp_type: - type: "string" -- column: "GetSqliteFunctions:max_real" - csharp_type: - type: "decimal" -- column: "*:c_text_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_integer_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_text_bool_override" - csharp_type: - type: "bool" -- column: "*:c_integer_bool_override" - csharp_type: - type: "bool" -- column: "*:c_text_noda_instant_override" - csharp_type: - type: "Instant" -- column: "*:c_integer_noda_instant_override" - csharp_type: - type: "Instant" -``` - -
- -
-SqliteDapperLegacy - -## Engine `sqlite`: [SqliteDapperLegacyExample](examples/SqliteDapperLegacyExample) -### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/SqliteDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: SqliteDapperLegacyExampleGen -overrides: -- column: "GetSqliteFunctions:max_integer" - csharp_type: - type: "int" -- column: "GetSqliteFunctions:max_varchar" - csharp_type: - type: "string" -- column: "GetSqliteFunctions:max_real" - csharp_type: - type: "decimal" -- column: "*:c_text_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_integer_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_text_bool_override" - csharp_type: - type: "bool" -- column: "*:c_integer_bool_override" - csharp_type: - type: "bool" -- column: "*:c_text_noda_instant_override" - csharp_type: - type: "Instant" -- column: "*:c_integer_noda_instant_override" - csharp_type: - type: "Instant" -``` - -
diff --git a/docs/scripts/generate_all_docs.sh b/docs/scripts/generate_all_docs.sh index 7187915e..86672384 100755 --- a/docs/scripts/generate_all_docs.sh +++ b/docs/scripts/generate_all_docs.sh @@ -3,5 +3,5 @@ set -e ./docs/scripts/generate_quickstart.sh > docs/02_Quickstart.md -dotnet run --project docs/ExamplesDocGen/ExampleDocGen.csproj > docs/08_Examples.md +dotnet run --project docs/ExamplesDocGen/ExampleDocGen.csproj > docs/09_Examples.md cat docs/0*.md > README.md \ No newline at end of file From d84bd35bd4c8235ea38455b8cb09da7f2b4266f3 Mon Sep 17 00:00:00 2001 From: Ilan Uzan Date: Sat, 3 Jan 2026 18:07:27 +0100 Subject: [PATCH 3/3] fix: docs --- README.md | 547 +--------------------------------------- docs/04_Postgres.md | 1 + docs/05_MySql.md | 1 + docs/06_Sqlite.md | 1 + docs/08_Contributing.md | 1 + docs/09_Examples.md | 44 ++-- 6 files changed, 37 insertions(+), 558 deletions(-) diff --git a/README.md b/README.md index 81088cd4..0740acac 100644 --- a/README.md +++ b/README.md @@ -244,6 +244,7 @@ INSERT INTO tab1 (macaddr8_field) VALUES (sqlc.narg('macaddr8_field')::macaddr8) ```
+ # MySQL
:execlastid - Implementation @@ -328,6 +329,7 @@ we consider support for the different data types separately for batch inserts an | geometrycollection | ⚠️ | ⚠️ |
+ # SQLite3
:execlastid - Implementation @@ -376,6 +378,7 @@ amount of data types that are supported by SQLite. The supported overrides are s | text | bool | ✅ | Converts string to a boolean value using Convert.ToBoolean rules |
+ # Benchmark Results ## Read Benchmarks @@ -451,6 +454,7 @@ By default, the release script will bump the patch version. Adding `[release]` t ### Release structure The new created tag will create a draft release with it, in the release there will be the wasm plugin embedded in the release.
+ # Examples
QuickStartPostgresDalGen @@ -1008,546 +1012,3 @@ overrides: ```
-# Examples -
-QuickStartPostgresDalGen - -## Engine `postgresql`: [QuickStartPostgresDalGen](examples/QuickStartPostgresDalGen) -### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/QuickStartPostgresDalGen.cs) -### Config -```yaml -``` - -
-
-QuickStartMySqlDalGen - -## Engine `mysql`: [QuickStartMySqlDalGen](examples/QuickStartMySqlDalGen) -### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/QuickStartMySqlDalGen.cs) -### Config -```yaml -``` - -
-
-QuickStartSqliteDalGen - -## Engine `sqlite`: [QuickStartSqliteDalGen](examples/QuickStartSqliteDalGen) -### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTests/QuickStartSqliteDalGen.cs) -### Config -```yaml -``` - -
-
-Npgsql - -## Engine `postgresql`: [NpgsqlExample](examples/NpgsqlExample) -### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/NpgsqlTester.cs) -### Config -```yaml -useDapper: false -targetFramework: net8.0 -generateCsproj: true -namespaceName: NpgsqlExampleGen -overrides: -- column: "GetPostgresFunctions:max_integer" - csharp_type: - type: "int" - notNull: false -- column: "GetPostgresFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetPostgresFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "GetPostgresSpecialTypesCnt:c_json" - csharp_type: - type: "JsonElement" - notNull: false -- column: "GetPostgresSpecialTypesCnt:c_jsonb" - csharp_type: - type: "JsonElement" - notNull: false -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_xml_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_macaddr8" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
-
-NpgsqlDapper - -## Engine `postgresql`: [NpgsqlDapperExample](examples/NpgsqlDapperExample) -### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/NpgsqlDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: net8.0 -generateCsproj: true -namespaceName: NpgsqlDapperExampleGen -overrides: -- column: "GetPostgresFunctions:max_integer" - csharp_type: - type: "int" - notNull: false -- column: "GetPostgresFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetPostgresFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "GetPostgresSpecialTypesCnt:c_json" - csharp_type: - type: "JsonElement" - notNull: false -- column: "GetPostgresSpecialTypesCnt:c_jsonb" - csharp_type: - type: "JsonElement" - notNull: false -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_xml_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_macaddr8" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
-
-NpgsqlLegacy - -## Engine `postgresql`: [NpgsqlLegacyExample](examples/NpgsqlLegacyExample) -### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/NpgsqlTester.cs) -### Config -```yaml -useDapper: false -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: NpgsqlLegacyExampleGen -overrides: -- column: "GetPostgresFunctions:max_integer" - csharp_type: - type: "int" - notNull: false -- column: "GetPostgresFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetPostgresFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "GetPostgresSpecialTypesCnt:c_json" - csharp_type: - type: "JsonElement" - notNull: false -- column: "GetPostgresSpecialTypesCnt:c_jsonb" - csharp_type: - type: "JsonElement" - notNull: false -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_xml_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_macaddr8" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
-
-NpgsqlDapperLegacy - -## Engine `postgresql`: [NpgsqlDapperLegacyExample](examples/NpgsqlDapperLegacyExample) -### [Schema](examples/config/postgresql/authors/schema.sql) | [Queries](examples/config/postgresql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/NpgsqlDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: NpgsqlDapperLegacyExampleGen -overrides: -- column: "GetPostgresFunctions:max_integer" - csharp_type: - type: "int" - notNull: false -- column: "GetPostgresFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetPostgresFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "GetPostgresSpecialTypesCnt:c_json" - csharp_type: - type: "JsonElement" - notNull: false -- column: "GetPostgresSpecialTypesCnt:c_jsonb" - csharp_type: - type: "JsonElement" - notNull: false -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_xml_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_macaddr8" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
-
-MySqlConnector - -## Engine `mysql`: [MySqlConnectorExample](examples/MySqlConnectorExample) -### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/MySqlConnectorTester.cs) -### Config -```yaml -useDapper: false -targetFramework: net8.0 -generateCsproj: true -namespaceName: MySqlConnectorExampleGen -overrides: -- column: "GetMysqlFunctions:max_int" - csharp_type: - type: "int" - notNull: false -- column: "GetMysqlFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetMysqlFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
-
-MySqlConnectorDapper - -## Engine `mysql`: [MySqlConnectorDapperExample](examples/MySqlConnectorDapperExample) -### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTests/MySqlConnectorDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: net8.0 -generateCsproj: true -namespaceName: MySqlConnectorDapperExampleGen -overrides: -- column: "GetMysqlFunctions:max_int" - csharp_type: - type: "int" - notNull: false -- column: "GetMysqlFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetMysqlFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
-
-MySqlConnectorLegacy - -## Engine `mysql`: [MySqlConnectorLegacyExample](examples/MySqlConnectorLegacyExample) -### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/MySqlConnectorTester.cs) -### Config -```yaml -useDapper: false -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: MySqlConnectorLegacyExampleGen -overrides: -- column: "GetMysqlFunctions:max_int" - csharp_type: - type: "int" - notNull: false -- column: "GetMysqlFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetMysqlFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
-
-MySqlConnectorDapperLegacy - -## Engine `mysql`: [MySqlConnectorDapperLegacyExample](examples/MySqlConnectorDapperLegacyExample) -### [Schema](examples/config/mysql/authors/schema.sql) | [Queries](examples/config/mysql/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: MySqlConnectorDapperLegacyExampleGen -overrides: -- column: "GetMysqlFunctions:max_int" - csharp_type: - type: "int" - notNull: false -- column: "GetMysqlFunctions:max_varchar" - csharp_type: - type: "string" - notNull: false -- column: "GetMysqlFunctions:max_timestamp" - csharp_type: - type: "DateTime" - notNull: true -- column: "*:c_json_string_override" - csharp_type: - type: "string" - notNull: false -- column: "*:c_timestamp_noda_instant_override" - csharp_type: - type: "Instant" - notNull: false -``` - -
-
-Sqlite - -## Engine `sqlite`: [SqliteExample](examples/SqliteExample) -### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTests/SqliteTester.cs) -### Config -```yaml -useDapper: false -targetFramework: net8.0 -generateCsproj: true -namespaceName: SqliteExampleGen -overrides: -- column: "GetSqliteFunctions:max_integer" - csharp_type: - type: "int" -- column: "GetSqliteFunctions:max_varchar" - csharp_type: - type: "string" -- column: "GetSqliteFunctions:max_real" - csharp_type: - type: "decimal" -- column: "*:c_text_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_integer_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_text_bool_override" - csharp_type: - type: "bool" -- column: "*:c_integer_bool_override" - csharp_type: - type: "bool" -- column: "*:c_text_noda_instant_override" - csharp_type: - type: "Instant" -- column: "*:c_integer_noda_instant_override" - csharp_type: - type: "Instant" -``` - -
-
-SqliteDapper - -## Engine `sqlite`: [SqliteDapperExample](examples/SqliteDapperExample) -### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTests/SqliteDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: net8.0 -generateCsproj: true -namespaceName: SqliteDapperExampleGen -overrides: -- column: "GetSqliteFunctions:max_integer" - csharp_type: - type: "int" -- column: "GetSqliteFunctions:max_varchar" - csharp_type: - type: "string" -- column: "GetSqliteFunctions:max_real" - csharp_type: - type: "decimal" -- column: "*:c_text_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_integer_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_text_bool_override" - csharp_type: - type: "bool" -- column: "*:c_integer_bool_override" - csharp_type: - type: "bool" -- column: "*:c_text_noda_instant_override" - csharp_type: - type: "Instant" -- column: "*:c_integer_noda_instant_override" - csharp_type: - type: "Instant" -``` - -
-
-SqliteLegacy - -## Engine `sqlite`: [SqliteLegacyExample](examples/SqliteLegacyExample) -### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/SqliteTester.cs) -### Config -```yaml -useDapper: false -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: SqliteLegacyExampleGen -overrides: -- column: "GetSqliteFunctions:max_integer" - csharp_type: - type: "int" -- column: "GetSqliteFunctions:max_varchar" - csharp_type: - type: "string" -- column: "GetSqliteFunctions:max_real" - csharp_type: - type: "decimal" -- column: "*:c_text_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_integer_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_text_bool_override" - csharp_type: - type: "bool" -- column: "*:c_integer_bool_override" - csharp_type: - type: "bool" -- column: "*:c_text_noda_instant_override" - csharp_type: - type: "Instant" -- column: "*:c_integer_noda_instant_override" - csharp_type: - type: "Instant" -``` - -
-
-SqliteDapperLegacy - -## Engine `sqlite`: [SqliteDapperLegacyExample](examples/SqliteDapperLegacyExample) -### [Schema](examples/config/sqlite/authors/schema.sql) | [Queries](examples/config/sqlite/authors/query.sql) | [End2End Test](end2end/EndToEndTestsLegacy/SqliteDapperTester.cs) -### Config -```yaml -useDapper: true -targetFramework: netstandard2.0 -generateCsproj: true -namespaceName: SqliteDapperLegacyExampleGen -overrides: -- column: "GetSqliteFunctions:max_integer" - csharp_type: - type: "int" -- column: "GetSqliteFunctions:max_varchar" - csharp_type: - type: "string" -- column: "GetSqliteFunctions:max_real" - csharp_type: - type: "decimal" -- column: "*:c_text_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_integer_datetime_override" - csharp_type: - type: "DateTime" -- column: "*:c_text_bool_override" - csharp_type: - type: "bool" -- column: "*:c_integer_bool_override" - csharp_type: - type: "bool" -- column: "*:c_text_noda_instant_override" - csharp_type: - type: "Instant" -- column: "*:c_integer_noda_instant_override" - csharp_type: - type: "Instant" -``` - -
\ No newline at end of file diff --git a/docs/04_Postgres.md b/docs/04_Postgres.md index f708bd91..54fb2df4 100644 --- a/docs/04_Postgres.md +++ b/docs/04_Postgres.md @@ -85,3 +85,4 @@ INSERT INTO tab1 (macaddr8_field) VALUES (sqlc.narg('macaddr8_field')::macaddr8) ``` + diff --git a/docs/05_MySql.md b/docs/05_MySql.md index 7944f710..6aef8aaa 100644 --- a/docs/05_MySql.md +++ b/docs/05_MySql.md @@ -82,3 +82,4 @@ we consider support for the different data types separately for batch inserts an | geometrycollection | ⚠️ | ⚠️ | + diff --git a/docs/06_Sqlite.md b/docs/06_Sqlite.md index 3f6cb7cb..7d94cf4a 100644 --- a/docs/06_Sqlite.md +++ b/docs/06_Sqlite.md @@ -46,3 +46,4 @@ amount of data types that are supported by SQLite. The supported overrides are s | text | bool | ✅ | Converts string to a boolean value using Convert.ToBoolean rules | + diff --git a/docs/08_Contributing.md b/docs/08_Contributing.md index b9a26332..997d928d 100644 --- a/docs/08_Contributing.md +++ b/docs/08_Contributing.md @@ -48,3 +48,4 @@ By default, the release script will bump the patch version. Adding `[release]` t ### Release structure The new created tag will create a draft release with it, in the release there will be the wasm plugin embedded in the release.
+ diff --git a/docs/09_Examples.md b/docs/09_Examples.md index 4ae55c58..a6ae5bf5 100644 --- a/docs/09_Examples.md +++ b/docs/09_Examples.md @@ -8,7 +8,8 @@ ```yaml ``` - + +
QuickStartMySqlDalGen @@ -18,7 +19,8 @@ ```yaml ``` -
+ +
QuickStartSqliteDalGen @@ -28,7 +30,8 @@ ```yaml ``` -
+ +
Npgsql @@ -79,7 +82,8 @@ overrides: notNull: false ``` -
+ +
NpgsqlDapper @@ -130,7 +134,8 @@ overrides: notNull: false ``` -
+ +
NpgsqlLegacy @@ -181,7 +186,8 @@ overrides: notNull: false ``` -
+ +
NpgsqlDapperLegacy @@ -232,7 +238,8 @@ overrides: notNull: false ``` -
+ +
MySqlConnector @@ -267,7 +274,8 @@ overrides: notNull: false ``` -
+ +
MySqlConnectorDapper @@ -302,7 +310,8 @@ overrides: notNull: false ``` -
+ +
MySqlConnectorLegacy @@ -337,7 +346,8 @@ overrides: notNull: false ``` -
+ +
MySqlConnectorDapperLegacy @@ -372,7 +382,8 @@ overrides: notNull: false ``` -
+ +
Sqlite @@ -414,7 +425,8 @@ overrides: type: "Instant" ``` -
+ +
SqliteDapper @@ -456,7 +468,8 @@ overrides: type: "Instant" ``` -
+ +
SqliteLegacy @@ -498,7 +511,8 @@ overrides: type: "Instant" ``` -
+ +
SqliteDapperLegacy @@ -540,4 +554,4 @@ overrides: type: "Instant" ``` -
\ No newline at end of file +