From 580d28a5bc7adc47772c244f31a6e11de427ab5e Mon Sep 17 00:00:00 2001 From: Ilan Uzan Date: Sat, 22 Nov 2025 14:41:40 +0200 Subject: [PATCH] feat: add Async suffix to generated methods by default --- .github/workflows/legacy-tests.yml | 5 + Drivers/Generators/CopyFromDeclareGen.cs | 2 +- Drivers/Generators/ExecDeclareGen.cs | 2 +- Drivers/Generators/ExecLastIdDeclareGen.cs | 2 +- Drivers/Generators/ExecRowsDeclareGen.cs | 2 +- Drivers/Generators/ManyDeclareGen.cs | 2 +- Drivers/Generators/OneDeclareGen.cs | 2 +- Extensions/StringExtensions.cs | 6 + PluginOptions/Options.cs | 3 + PluginOptions/RawOptions.cs | 5 +- docs/03_Usage.md | 1 + end2end/EndToEndScaffold/Consts.cs | 16 +- .../Templates/AnnotationTests.cs | 24 +- .../EndToEndScaffold/Templates/MacroTests.cs | 28 +- .../EndToEndScaffold/Templates/MySqlTests.cs | 80 +++--- .../Templates/PostgresTests.cs | 170 ++++++------ .../EndToEndScaffold/Templates/SqliteTests.cs | 36 +-- .../MySqlConnectorDapperTester.cs | 12 +- .../MySqlConnectorDapperTester.generated.cs | 174 ++++++------ end2end/EndToEndTests/MySqlConnectorTester.cs | 12 +- .../MySqlConnectorTester.generated.cs | 174 ++++++------ end2end/EndToEndTests/NpgsqlDapperTester.cs | 16 +- .../NpgsqlDapperTester.generated.cs | 258 +++++++++--------- end2end/EndToEndTests/NpgsqlTester.cs | 18 +- .../EndToEndTests/NpgsqlTester.generated.cs | 258 +++++++++--------- end2end/EndToEndTests/SqliteDapperTester.cs | 4 +- .../SqliteDapperTester.generated.cs | 132 ++++----- end2end/EndToEndTests/SqliteTester.cs | 4 +- .../EndToEndTests/SqliteTester.generated.cs | 132 ++++----- .../MySqlConnectorDapperTester.cs | 12 +- .../MySqlConnectorDapperTester.generated.cs | 174 ++++++------ .../MySqlConnectorTester.cs | 12 +- .../MySqlConnectorTester.generated.cs | 174 ++++++------ .../EndToEndTestsLegacy/NpgsqlDapperTester.cs | 16 +- .../NpgsqlDapperTester.generated.cs | 258 +++++++++--------- end2end/EndToEndTestsLegacy/NpgsqlTester.cs | 16 +- .../NpgsqlTester.generated.cs | 258 +++++++++--------- .../EndToEndTestsLegacy/SqliteDapperTester.cs | 4 +- .../SqliteDapperTester.generated.cs | 132 ++++----- end2end/EndToEndTestsLegacy/SqliteTester.cs | 4 +- .../SqliteTester.generated.cs | 132 ++++----- .../MySqlConnectorDapperExample/QuerySql.cs | 78 +++--- .../MySqlConnectorDapperExample/request.json | 2 +- .../request.message | Bin 26369 -> 26392 bytes .../QuerySql.cs | 78 +++--- .../request.json | 2 +- .../request.message | Bin 26403 -> 26426 bytes examples/MySqlConnectorExample/QuerySql.cs | 78 +++--- examples/MySqlConnectorExample/request.json | 2 +- .../MySqlConnectorExample/request.message | Bin 26353 -> 26376 bytes .../MySqlConnectorLegacyExample/QuerySql.cs | 78 +++--- .../MySqlConnectorLegacyExample/request.json | 2 +- .../request.message | Bin 26387 -> 26410 bytes examples/NpgsqlDapperExample/QuerySql.cs | 114 ++++---- examples/NpgsqlDapperExample/request.json | 2 +- examples/NpgsqlDapperExample/request.message | 2 +- .../NpgsqlDapperLegacyExample/QuerySql.cs | 114 ++++---- .../NpgsqlDapperLegacyExample/request.json | 2 +- .../NpgsqlDapperLegacyExample/request.message | 2 +- examples/NpgsqlExample/QuerySql.cs | 114 ++++---- examples/NpgsqlExample/request.json | 2 +- examples/NpgsqlExample/request.message | 2 +- examples/NpgsqlLegacyExample/QuerySql.cs | 114 ++++---- examples/NpgsqlLegacyExample/request.json | 2 +- examples/NpgsqlLegacyExample/request.message | 2 +- examples/QuickStartMySqlDalGen/QuerySql.cs | 36 +-- examples/QuickStartMySqlDalGen/request.json | 2 +- .../QuickStartMySqlDalGen/request.message | Bin 5862 -> 5885 bytes examples/QuickStartPostgresDalGen/QuerySql.cs | 36 +-- .../QuickStartPostgresDalGen/request.json | 2 +- .../QuickStartPostgresDalGen/request.message | 2 +- examples/QuickStartSqliteDalGen/QuerySql.cs | 32 +-- examples/QuickStartSqliteDalGen/request.json | 2 +- .../QuickStartSqliteDalGen/request.message | Bin 5180 -> 5203 bytes examples/SqliteDapperExample/QuerySql.cs | 44 +-- examples/SqliteDapperExample/request.json | 2 +- examples/SqliteDapperExample/request.message | Bin 10917 -> 10940 bytes .../SqliteDapperLegacyExample/QuerySql.cs | 44 +-- .../SqliteDapperLegacyExample/request.json | 2 +- .../SqliteDapperLegacyExample/request.message | Bin 10951 -> 10974 bytes examples/SqliteExample/QuerySql.cs | 44 +-- examples/SqliteExample/request.json | 2 +- examples/SqliteExample/request.message | Bin 10901 -> 10924 bytes examples/SqliteLegacyExample/QuerySql.cs | 44 +-- examples/SqliteLegacyExample/request.json | 2 +- examples/SqliteLegacyExample/request.message | Bin 10935 -> 10958 bytes global.json | 2 +- .../DefaultSchemaEnum/request.json | 2 +- .../DefaultSchemaEnum/request.message | 2 +- .../SchemaScopedEnum/request.json | 2 +- .../SchemaScopedEnum/request.message | 2 +- 91 files changed, 1944 insertions(+), 1926 deletions(-) diff --git a/.github/workflows/legacy-tests.yml b/.github/workflows/legacy-tests.yml index d6bd6895..36bb4852 100644 --- a/.github/workflows/legacy-tests.yml +++ b/.github/workflows/legacy-tests.yml @@ -20,6 +20,11 @@ jobs: steps: - uses: actions/checkout@v4 + + - name: Set up .NET from global.json + uses: actions/setup-dotnet@v4 + with: + global-json-file: global.json - name: Load .env file uses: xom9ikk/dotenv@v2.3.0 diff --git a/Drivers/Generators/CopyFromDeclareGen.cs b/Drivers/Generators/CopyFromDeclareGen.cs index 9ffb3488..19c557e7 100644 --- a/Drivers/Generators/CopyFromDeclareGen.cs +++ b/Drivers/Generators/CopyFromDeclareGen.cs @@ -9,7 +9,7 @@ public class CopyFromDeclareGen(DbDriver dbDriver) public MemberDeclarationSyntax Generate(string queryTextConstant, string argInterface, Query query) { return ParseMemberDeclaration($$""" - public async Task {{query.Name}}(List<{{argInterface}}> args) + public async Task {{query.Name.ToMethodName(dbDriver.Options.WithAsyncSuffix)}}(List<{{argInterface}}> args) { {{((ICopyFrom)dbDriver).GetCopyFromImpl(query, queryTextConstant)}} } diff --git a/Drivers/Generators/ExecDeclareGen.cs b/Drivers/Generators/ExecDeclareGen.cs index e2b6bb38..afbc171f 100644 --- a/Drivers/Generators/ExecDeclareGen.cs +++ b/Drivers/Generators/ExecDeclareGen.cs @@ -13,7 +13,7 @@ public MemberDeclarationSyntax Generate(string queryTextConstant, string argInte { var parametersStr = CommonGen.GetMethodParameterList(argInterface, query.Params); return ParseMemberDeclaration($$""" - public async Task {{query.Name}}({{parametersStr}}) + public async Task {{query.Name.ToMethodName(dbDriver.Options.WithAsyncSuffix)}}({{parametersStr}}) { {{GetMethodBody(queryTextConstant, query)}} } diff --git a/Drivers/Generators/ExecLastIdDeclareGen.cs b/Drivers/Generators/ExecLastIdDeclareGen.cs index 7493bda8..79f7dc25 100644 --- a/Drivers/Generators/ExecLastIdDeclareGen.cs +++ b/Drivers/Generators/ExecLastIdDeclareGen.cs @@ -13,7 +13,7 @@ public MemberDeclarationSyntax Generate(string queryTextConstant, string argInte { var parametersStr = CommonGen.GetMethodParameterList(argInterface, query.Params); return ParseMemberDeclaration($$""" - public async Task<{{dbDriver.GetIdColumnType(query)}}> {{query.Name}}({{parametersStr}}) + public async Task<{{dbDriver.GetIdColumnType(query)}}> {{query.Name.ToMethodName(dbDriver.Options.WithAsyncSuffix)}}({{parametersStr}}) { {{GetMethodBody(queryTextConstant, query)}} } diff --git a/Drivers/Generators/ExecRowsDeclareGen.cs b/Drivers/Generators/ExecRowsDeclareGen.cs index c5711e8b..7eb7c4bc 100644 --- a/Drivers/Generators/ExecRowsDeclareGen.cs +++ b/Drivers/Generators/ExecRowsDeclareGen.cs @@ -13,7 +13,7 @@ public MemberDeclarationSyntax Generate(string queryTextConstant, string argInte { var parametersStr = CommonGen.GetMethodParameterList(argInterface, query.Params); return ParseMemberDeclaration($$""" - public async Task {{query.Name}}({{parametersStr}}) + public async Task {{query.Name.ToMethodName(dbDriver.Options.WithAsyncSuffix)}}({{parametersStr}}) { {{GetMethodBody(queryTextConstant, query)}} } diff --git a/Drivers/Generators/ManyDeclareGen.cs b/Drivers/Generators/ManyDeclareGen.cs index a9096d32..954a8839 100644 --- a/Drivers/Generators/ManyDeclareGen.cs +++ b/Drivers/Generators/ManyDeclareGen.cs @@ -15,7 +15,7 @@ public MemberDeclarationSyntax Generate(string queryTextConstant, string argInte var parametersStr = CommonGen.GetMethodParameterList(argInterface, query.Params); var returnType = $"Task>"; return ParseMemberDeclaration($$""" - public async {{returnType}} {{query.Name}}({{parametersStr}}) + public async {{returnType}} {{query.Name.ToMethodName(dbDriver.Options.WithAsyncSuffix)}}({{parametersStr}}) { {{GetMethodBody(queryTextConstant, returnInterface, query)}} } diff --git a/Drivers/Generators/OneDeclareGen.cs b/Drivers/Generators/OneDeclareGen.cs index c0715ba8..20734b77 100644 --- a/Drivers/Generators/OneDeclareGen.cs +++ b/Drivers/Generators/OneDeclareGen.cs @@ -15,7 +15,7 @@ public MemberDeclarationSyntax Generate(string queryTextConstant, string argInte var returnType = $"Task<{dbDriver.AddNullableSuffixIfNeeded(returnInterface, false)}>"; var parametersStr = CommonGen.GetMethodParameterList(argInterface, query.Params); return ParseMemberDeclaration($$""" - public async {{returnType}} {{query.Name}}({{parametersStr}}) + public async {{returnType}} {{query.Name.ToMethodName(dbDriver.Options.WithAsyncSuffix)}}({{parametersStr}}) { {{GetMethodBody(queryTextConstant, returnInterface, query)}} } diff --git a/Extensions/StringExtensions.cs b/Extensions/StringExtensions.cs index 40ea9425..0551e1f0 100644 --- a/Extensions/StringExtensions.cs +++ b/Extensions/StringExtensions.cs @@ -51,6 +51,12 @@ public static string ToModelName(this string value, string schema, string defaul return $"{schemaName}_{value.TrimEnd('s')}".ToPascalCase(); // TODO implement better way to turn words to singular } + public static string ToMethodName(this string value, bool withAsyncSuffix) + { + var methodName = value.ToPascalCase(); + return withAsyncSuffix ? $"{methodName}Async" : methodName; + } + public static string AppendSemicolonUnlessEmpty(this string input) { return input == string.Empty ? "" : $"{input};"; diff --git a/PluginOptions/Options.cs b/PluginOptions/Options.cs index 9215ec0d..4bf774ea 100644 --- a/PluginOptions/Options.cs +++ b/PluginOptions/Options.cs @@ -25,6 +25,7 @@ public Options(GenerateRequest generateRequest) NamespaceName = rawOptions.NamespaceName; DotnetFramework = DotnetFrameworkExtensions.ParseName(rawOptions.TargetFramework); Overrides = rawOptions.Overrides ?? []; + WithAsyncSuffix = rawOptions.WithAsyncSuffix; if (rawOptions.DebugRequest && generateRequest.Settings.Codegen.Wasm is not null) throw new ArgumentException("Debug request mode cannot be used with WASM plugin"); @@ -57,6 +58,8 @@ public Options(GenerateRequest generateRequest) /// public bool UseCentralPackageManagement { get; } + public bool WithAsyncSuffix { get; } + private static readonly Dictionary EngineToDriverMapping = new() { { "mysql", DriverName.MySqlConnector }, diff --git a/PluginOptions/RawOptions.cs b/PluginOptions/RawOptions.cs index ea779dcb..7697dbce 100644 --- a/PluginOptions/RawOptions.cs +++ b/PluginOptions/RawOptions.cs @@ -9,7 +9,7 @@ public record RawOptions public string OverrideDriverVersion { get; init; } = string.Empty; [JsonPropertyName("generateCsproj")] - public bool GenerateCsproj { get; init; } = true; // generating .csproj files by default + public bool GenerateCsproj { get; init; } = true; [JsonPropertyName("targetFramework")] public string TargetFramework { get; init; } = DotnetFramework.Dotnet80.ToName(); @@ -31,6 +31,9 @@ public record RawOptions [JsonPropertyName("useCentralPackageManagement")] public bool UseCentralPackageManagement { get; init; } + + [JsonPropertyName("withAsyncSuffix")] + public bool WithAsyncSuffix { get; init; } = true; } public class OverrideOption diff --git a/docs/03_Usage.md b/docs/03_Usage.md index 13d80aaa..c4a9726d 100644 --- a/docs/03_Usage.md +++ b/docs/03_Usage.md @@ -11,6 +11,7 @@ | overrideDapperVersion | default:
`2.1.35`
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. | | 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. | | | useCentralPackageManagement | default: `false`
values: `false`,`true` | Yes | If true, the code is generated to support central package management. | +| withAsyncSuffix | default: `true`
values: `false`,`true` | Yes | When true, async methods will have the "Async" suffix appended to their names (e.g., `GetAuthorAsync`). When false, async methods will not have the suffix (e.g., `GetAuthor`). | ### Override option Override for a specific query: diff --git a/end2end/EndToEndScaffold/Consts.cs b/end2end/EndToEndScaffold/Consts.cs index f91a61bc..ed15d0d1 100644 --- a/end2end/EndToEndScaffold/Consts.cs +++ b/end2end/EndToEndScaffold/Consts.cs @@ -20,7 +20,7 @@ public static class Consts public const string GenericQuote2 = "\"Only 2 things are infinite, the universe and human stupidity\""; public static readonly string CreateBojackAuthor = $$""" - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = {{BojackId}}, Name = {{BojackAuthor}}, @@ -29,7 +29,7 @@ await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs """; public const string CreateBojackAuthorWithId = $$""" - var bojackId = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs + var bojackId = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = {{BojackAuthor}}, Bio = {{BojackTheme}} @@ -37,7 +37,7 @@ await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs """; public const string CreateBookByBojack = $$""" - var bojackBookId = await QuerySql.CreateBook(new QuerySql.CreateBookArgs + var bojackBookId = await QuerySql.CreateBookAsync(new QuerySql.CreateBookArgs { Name = {{BojackBookTitle}}, AuthorId = bojackId @@ -45,7 +45,7 @@ await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs """; public static readonly string CreateDrSeussAuthor = $$""" - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = {{DrSeussId}}, Name = {{DrSeussAuthor}}, @@ -54,7 +54,7 @@ await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs """; public const string CreateDrSeussAuthorWithId = $$""" - var drSeussId = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs + var drSeussId = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = {{DrSeussAuthor}}, Bio = {{DrSeussQuote}} @@ -62,7 +62,7 @@ await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs """; public const string CreateBookByDrSeuss = $$""" - var drSeussBookId = await QuerySql.CreateBook(new QuerySql.CreateBookArgs + var drSeussBookId = await QuerySql.CreateBookAsync(new QuerySql.CreateBookArgs { AuthorId = drSeussId, Name = {{DrSeussBookTitle}} @@ -70,7 +70,7 @@ await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs """; public const string CreateFirstGenericAuthor = $$""" - var id1 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs + var id1 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = {{GenericAuthor}}, Bio = {{GenericQuote1}} @@ -78,7 +78,7 @@ await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs """; public const string CreateSecondGenericAuthor = $$""" - var id2 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs + var id2 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = {{GenericAuthor}}, Bio = {{GenericQuote2}} diff --git a/end2end/EndToEndScaffold/Templates/AnnotationTests.cs b/end2end/EndToEndScaffold/Templates/AnnotationTests.cs index 7d73f5d6..caf349b2 100644 --- a/end2end/EndToEndScaffold/Templates/AnnotationTests.cs +++ b/end2end/EndToEndScaffold/Templates/AnnotationTests.cs @@ -12,7 +12,7 @@ public static class AnnotationTests { Impl = $$""" [Test] - public async Task TestOne() + public async Task TestOneAsync() { {{Consts.CreateBojackAuthor}} {{Consts.CreateDrSeussAuthor}} @@ -22,7 +22,7 @@ public async Task TestOne() Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); @@ -41,7 +41,7 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { Impl = $$""" [Test] - public async Task TestMany() + public async Task TestManyAsync() { {{Consts.CreateBojackAuthor}} {{Consts.CreateDrSeussAuthor}} @@ -60,7 +60,7 @@ public async Task TestMany() Bio = {{Consts.DrSeussQuote}} } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 @@ -87,15 +87,15 @@ void AssertSequenceEquals(List x, List x, List x, List y) @@ -53,7 +53,7 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth { Impl = $$""" [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { {{Consts.CreateBojackAuthor}} {{Consts.CreateDrSeussAuthor}} @@ -68,7 +68,7 @@ public async Task TestNargNotNull() } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) @@ -91,7 +91,7 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth { Impl = $$""" [Test] - public async Task TestJoinEmbed() + public async Task TestJoinEmbedAsync() { {{Consts.CreateBojackAuthorWithId}} {{Consts.CreateBookByBojack}} @@ -130,7 +130,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) @@ -156,7 +156,7 @@ void AssertSequenceEquals(List x, List x, List x, List cSet) { - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CEnum = cEnum, CSet = cSet @@ -676,7 +676,7 @@ await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs CEnum = cEnum, CSet = cSet }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) @@ -722,14 +722,14 @@ public async Task TestCopyFrom( CSet = cSet }) .ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, CEnum = cEnum, CSet = cSet }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) @@ -747,7 +747,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysq [Test] public async Task TestMySqlScopedSchemaEnum() { - await this.QuerySql.CreateExtendedBio(new QuerySql.CreateExtendedBioArgs + await this.QuerySql.CreateExtendedBioAsync(new QuerySql.CreateExtendedBioArgs { AuthorName = {{Consts.BojackAuthor}}, Name = {{Consts.BojackBookTitle}}, @@ -762,7 +762,7 @@ await this.QuerySql.CreateExtendedBio(new QuerySql.CreateExtendedBioArgs AuthorType = new HashSet { BiosAuthorType.Author, BiosAuthorType.Translator } }; - var actual = await this.QuerySql.GetFirstExtendedBioByType(new QuerySql.GetFirstExtendedBioByTypeArgs + var actual = await this.QuerySql.GetFirstExtendedBioByTypeAsync(new QuerySql.GetFirstExtendedBioByTypeArgs { BioType = BiosBioType.Memoir }); @@ -791,7 +791,7 @@ public async Task TestMySqlJsonDataType( if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CJson = cParsedJson, CJsonStringOverride = cJson @@ -801,7 +801,7 @@ await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs CJson = cParsedJson, CJsonStringOverride = cJson }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) @@ -821,7 +821,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlSt public void TestMySqlInvalidJson() { Assert.ThrowsAsync(async () => await - QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs + QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); @@ -848,14 +848,14 @@ public async Task TestJsonCopyFrom( CJson = cParsedJson }) .ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, CJson = cParsedJson }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) @@ -879,15 +879,15 @@ public async Task TestMySqlDataTypesOverride( string cVarchar, DateTime cTimestamp) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CInt = cInt }); - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CVarchar = cVarchar }); - await QuerySql.InsertMysqlDatetimeTypes(new QuerySql.InsertMysqlDatetimeTypesArgs + await QuerySql.InsertMysqlDatetimeTypesAsync(new QuerySql.InsertMysqlDatetimeTypesArgs { CTimestamp = cTimestamp }); @@ -899,7 +899,7 @@ await QuerySql.InsertMysqlDatetimeTypes(new QuerySql.InsertMysqlDatetimeTypesArg MaxTimestamp = cTimestamp }; - var actual = await QuerySql.GetMysqlFunctions(); + var actual = await QuerySql.GetMysqlFunctionsAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetMysqlFunctionsRow x, QuerySql.GetMysqlFunctionsRow y) diff --git a/end2end/EndToEndScaffold/Templates/PostgresTests.cs b/end2end/EndToEndScaffold/Templates/PostgresTests.cs index 75f7150a..50a0a3fc 100644 --- a/end2end/EndToEndScaffold/Templates/PostgresTests.cs +++ b/end2end/EndToEndScaffold/Templates/PostgresTests.cs @@ -12,14 +12,14 @@ public static class PostgresTests [Test] [TestCase("E", "It takes a nation of millions to hold us back", "Rebel Without a Pause", "Master of Puppets", "Prophets of Rage")] [TestCase(null, null, null, null, null)] - public async Task TestPostgresStringTypes( + public async Task TestPostgresStringTypesAsync( string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) { - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CChar = cChar, CVarchar = cVarchar, @@ -37,7 +37,7 @@ await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesA CText = cText, }; - var actual = await QuerySql.GetPostgresStringTypes(); + var actual = await QuerySql.GetPostgresStringTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresStringTypesRow x, QuerySql.GetPostgresStringTypesRow y) @@ -57,13 +57,13 @@ void AssertSingularEquals(QuerySql.GetPostgresStringTypesRow x, QuerySql.GetPost [Test] [TestCase(true, 35, -23423, 4235235263L)] [TestCase(null, null, null, null)] - public async Task TestPostgresIntegerTypes( + public async Task TestPostgresIntegerTypesAsync( bool cBoolean, short cSmallint, int cInteger, long cBigint) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CBoolean = cBoolean, CSmallint = cSmallint, @@ -78,7 +78,7 @@ await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericType CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetPostgresNumericTypes(); + var actual = await QuerySql.GetPostgresNumericTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPostgresNumericTypesRow y) @@ -97,14 +97,14 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPos [Test] [TestCase(3.83f, 4.5534, 998.432, -8403284.321435, 42332.53)] [TestCase(null, null, null, null, null)] - public async Task TestPostgresFloatingPointTypes( + public async Task TestPostgresFloatingPointTypesAsync( float? cReal, decimal? cNumeric, decimal? cDecimal, double? cDoublePrecision, decimal? cMoney) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CReal = cReal, CNumeric = cNumeric, @@ -121,7 +121,7 @@ await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericType CDoublePrecision = cDoublePrecision, CMoney = cMoney }; - var actual = await QuerySql.GetPostgresNumericTypes(); + var actual = await QuerySql.GetPostgresNumericTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPostgresNumericTypesRow y) @@ -164,7 +164,7 @@ private static IEnumerable PostgresDateTimeTypesTestCases [Test] [TestCaseSource(nameof(PostgresDateTimeTypesTestCases))] - public async Task TestPostgresDateTimeTypes( + public async Task TestPostgresDateTimeTypesAsync( DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, @@ -172,7 +172,7 @@ public async Task TestPostgresDateTimeTypes( TimeSpan? cInterval, Instant? cTimestampNodaInstantOverride) { - await QuerySql.InsertPostgresDateTimeTypes(new QuerySql.InsertPostgresDateTimeTypesArgs + await QuerySql.InsertPostgresDateTimeTypesAsync(new QuerySql.InsertPostgresDateTimeTypesArgs { CDate = cDate, CTime = cTime, @@ -191,7 +191,7 @@ await QuerySql.InsertPostgresDateTimeTypes(new QuerySql.InsertPostgresDateTimeTy CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }; - var actual = await QuerySql.GetPostgresDateTimeTypes(); + var actual = await QuerySql.GetPostgresDateTimeTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresDateTimeTypesRow x, QuerySql.GetPostgresDateTimeTypesRow y) @@ -247,7 +247,7 @@ private static IEnumerable PostgresArrayTypesTestCases [Test] [TestCaseSource(nameof(PostgresArrayTypesTestCases))] - public async Task TestPostgresArrayTypes( + public async Task TestPostgresArrayTypesAsync( byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, @@ -256,7 +256,7 @@ public async Task TestPostgresArrayTypes( DateTime[] cDateArray, DateTime[] cTimestampArray) { - await QuerySql.InsertPostgresArrayTypes(new QuerySql.InsertPostgresArrayTypesArgs + await QuerySql.InsertPostgresArrayTypesAsync(new QuerySql.InsertPostgresArrayTypesArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, @@ -277,7 +277,7 @@ await QuerySql.InsertPostgresArrayTypes(new QuerySql.InsertPostgresArrayTypesArg CDateArray = cDateArray, CTimestampArray = cTimestampArray }; - var actual = await QuerySql.GetPostgresArrayTypes(); + var actual = await QuerySql.GetPostgresArrayTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresArrayTypesRow x, QuerySql.GetPostgresArrayTypesRow y) @@ -299,7 +299,7 @@ void AssertSingularEquals(QuerySql.GetPostgresArrayTypesRow x, QuerySql.GetPostg [Test] [TestCase(100, "z", "Sex Pistols", "Anarchy in the U.K", "Yoshimi Battles the Pink Robots", "Never Mind the Bollocks...")] [TestCase(10, null, null, null, null, null)] - public async Task TestStringCopyFrom( + public async Task TestStringCopyFromAsync( int batchSize, string cChar, string cVarchar, @@ -317,7 +317,7 @@ public async Task TestStringCopyFrom( CText = cText }) .ToList(); - await QuerySql.InsertPostgresStringTypesBatch(batchArgs); + await QuerySql.InsertPostgresStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresStringTypesCntRow { Cnt = batchSize, @@ -327,7 +327,7 @@ public async Task TestStringCopyFrom( CBpchar = cBpchar, CText = cText }; - var actual = await QuerySql.GetPostgresStringTypesCnt(); + var actual = await QuerySql.GetPostgresStringTypesCntAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresStringTypesCntRow x, QuerySql.GetPostgresStringTypesCntRow y) @@ -348,7 +348,7 @@ void AssertSingularEquals(QuerySql.GetPostgresStringTypesCntRow x, QuerySql.GetP [Test] [TestCase(100, true, 3, 453, -1445214231L)] [TestCase(10, null, null, null, null)] - public async Task TestIntegerCopyFrom( + public async Task TestIntegerCopyFromAsync( int batchSize, bool? cBoolean, short? cSmallint, @@ -364,7 +364,7 @@ public async Task TestIntegerCopyFrom( CBigint = cBigint }) .ToList(); - await QuerySql.InsertPostgresNumericTypesBatch(batchArgs); + await QuerySql.InsertPostgresNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNumericTypesCntRow { Cnt = batchSize, @@ -373,7 +373,7 @@ public async Task TestIntegerCopyFrom( CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetPostgresNumericTypesCnt(); + var actual = await QuerySql.GetPostgresNumericTypesCntAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.GetPostgresNumericTypesCntRow y) @@ -393,7 +393,7 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.Get [Test] [TestCase(100, 666.6f, 336.3431, -99.999, -1377.996, -43242.43)] [TestCase(10, null, null, null, null, null)] - public async Task TestFloatingPointCopyFrom( + public async Task TestFloatingPointCopyFromAsync( int batchSize, float? cReal, decimal? cDecimal, @@ -411,7 +411,7 @@ public async Task TestFloatingPointCopyFrom( CMoney = cMoney }) .ToList(); - await QuerySql.InsertPostgresNumericTypesBatch(batchArgs); + await QuerySql.InsertPostgresNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNumericTypesCntRow { Cnt = batchSize, @@ -421,7 +421,7 @@ public async Task TestFloatingPointCopyFrom( CDoublePrecision = cDoublePrecision, CMoney = cMoney }; - var actual = await QuerySql.GetPostgresNumericTypesCnt(); + var actual = await QuerySql.GetPostgresNumericTypesCntAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.GetPostgresNumericTypesCntRow y) @@ -442,7 +442,7 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.Get [Test] [TestCase(100, "1973-12-3", "00:34:00", "1960-11-3 02:01:22", "2030-07-20 15:44:01+09:00", "02:03:04")] [TestCase(10, null, null, null, null, null)] - public async Task TestDateTimeCopyFrom( + public async Task TestDateTimeCopyFromAsync( int batchSize, DateTime? cDate, TimeSpan? cTime, @@ -464,7 +464,7 @@ public async Task TestDateTimeCopyFrom( CInterval = cInterval }) .ToList(); - await QuerySql.InsertPostgresDateTimeTypesBatch(batchArgs); + await QuerySql.InsertPostgresDateTimeTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresDateTimeTypesCntRow { Cnt = batchSize, @@ -474,7 +474,7 @@ public async Task TestDateTimeCopyFrom( CTimestampWithTz = cTimestampWithTz, CInterval = cInterval }; - var actual = await QuerySql.GetPostgresDateTimeTypesCnt(); + var actual = await QuerySql.GetPostgresDateTimeTypesCntAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresDateTimeTypesCntRow x, QuerySql.GetPostgresDateTimeTypesCntRow y) @@ -495,7 +495,7 @@ void AssertSingularEquals(QuerySql.GetPostgresDateTimeTypesCntRow x, QuerySql.Ge [Test] [TestCase("{\"name\": \"Swordfishtrombones\", \"year\" :1983}", "$.\"name\"")] [TestCase(null, null)] - public async Task TestPostgresJsonDataTypes( + public async Task TestPostgresJsonDataTypesAsync( string cJson, string cJsonpath) { @@ -503,7 +503,7 @@ public async Task TestPostgresJsonDataTypes( if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJson = cParsedJson, CJsonb = cParsedJson, @@ -519,7 +519,7 @@ await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialType CJsonpath = cJsonpath }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) @@ -546,7 +546,7 @@ void AssertJsonElementEquals(JsonElement? x, JsonElement? y) [Test] [TestCase(100, "{\"song\": \"Pinball Wizard\", \"album\": \"Tommy\", \"artist\": \"The Who\"}")] [TestCase(10, null)] - public async Task TestPostgresJsonCopyFrom(int batchSize, string cJson) + public async Task TestPostgresJsonCopyFromAsync(int batchSize, string cJson) { JsonElement? cParsedJson = null; if (cJson != null) @@ -559,7 +559,7 @@ public async Task TestPostgresJsonCopyFrom(int batchSize, string cJson) CJsonb = cParsedJson }) .ToList(); - await QuerySql.InsertPostgresSpecialTypesBatch(batchArgs); + await QuerySql.InsertPostgresSpecialTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresSpecialTypesCntRow { @@ -567,7 +567,7 @@ public async Task TestPostgresJsonCopyFrom(int batchSize, string cJson) CJson = cParsedJson, CJsonb = cParsedJson }; - var actual = await QuerySql.GetPostgresSpecialTypesCnt(); + var actual = await QuerySql.GetPostgresSpecialTypesCntAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.GetPostgresSpecialTypesCntRow y) @@ -594,13 +594,13 @@ void AssertJsonElementEquals(JsonElement? x, JsonElement? y) public void TestPostgresInvalidJson() { Assert.ThrowsAsync(async () => await - QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs + QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); Assert.ThrowsAsync(async () => await - QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs + QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonpath = "SOME INVALID JSONPATH" })); @@ -632,13 +632,13 @@ private static IEnumerable PostgresNetworkDataTypesTestCases [Test] [TestCaseSource(nameof(PostgresNetworkDataTypesTestCases))] - public async Task TestPostgresNetworkDataTypes( + public async Task TestPostgresNetworkDataTypesAsync( NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr, string cMacaddr8) { - await QuerySql.InsertPostgresNetworkTypes(new QuerySql.InsertPostgresNetworkTypesArgs + await QuerySql.InsertPostgresNetworkTypesAsync(new QuerySql.InsertPostgresNetworkTypesArgs { CCidr = cCidr, CInet = cInet, @@ -654,7 +654,7 @@ await QuerySql.InsertPostgresNetworkTypes(new QuerySql.InsertPostgresNetworkType CMacaddr8 = cMacaddr8 }; - var actual = await QuerySql.GetPostgresNetworkTypes(); + var actual = await QuerySql.GetPostgresNetworkTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresNetworkTypesRow x, QuerySql.GetPostgresNetworkTypesRow y) @@ -708,7 +708,7 @@ private static IEnumerable PostgresArrayCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresArrayCopyFromTestCases))] - public async Task TestArrayCopyFrom( + public async Task TestArrayCopyFromAsync( int batchSize, byte[] cBytea, bool[] cBooleanArray, @@ -728,7 +728,7 @@ public async Task TestArrayCopyFrom( CTimestampArray = cTimestampArray }) .ToList(); - await QuerySql.InsertPostgresArrayTypesBatch(batchArgs); + await QuerySql.InsertPostgresArrayTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresArrayTypesCntRow { Cnt = batchSize, @@ -740,7 +740,7 @@ public async Task TestArrayCopyFrom( CTimestampArray = cTimestampArray }; - var actual = await QuerySql.GetPostgresArrayTypesCnt(); + var actual = await QuerySql.GetPostgresArrayTypesCntAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresArrayTypesCntRow x, QuerySql.GetPostgresArrayTypesCntRow y) @@ -760,11 +760,11 @@ void AssertSingularEquals(QuerySql.GetPostgresArrayTypesCntRow x, QuerySql.GetPo { Impl = $$""" [Test] - public async Task TestArray() + public async Task TestArrayAsync() { {{Consts.CreateFirstGenericAuthor}} {{Consts.CreateBojackAuthorWithId}} - var actual = await QuerySql.GetAuthorsByIds(new QuerySql.GetAuthorsByIdsArgs + var actual = await QuerySql.GetAuthorsByIdsAsync(new QuerySql.GetAuthorsByIdsArgs { LongArr1 = new[] { id1, bojackId } }); @@ -776,13 +776,13 @@ public async Task TestArray() { Impl = $$""" [Test] - public async Task TestMultipleArrays() + public async Task TestMultipleArraysAsync() { {{Consts.CreateFirstGenericAuthor}} {{Consts.CreateSecondGenericAuthor}} {{Consts.CreateBojackAuthorWithId}} - var actual = await QuerySql.GetAuthorsByIdsAndNames(new QuerySql.GetAuthorsByIdsAndNamesArgs + var actual = await QuerySql.GetAuthorsByIdsAndNamesAsync(new QuerySql.GetAuthorsByIdsAndNamesArgs { LongArr1 = new[] { id1, bojackId }, StringArr2 = new[] { {{Consts.GenericAuthor}} } @@ -822,9 +822,9 @@ private static IEnumerable PostgresGeoTypesTestCases [Test] [TestCaseSource(nameof(PostgresGeoTypesTestCases))] - public async Task TestPostgresGeoTypes(NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) + public async Task TestPostgresGeoTypesAsync(NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) { - await QuerySql.InsertPostgresGeoTypes(new QuerySql.InsertPostgresGeoTypesArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }); + await QuerySql.InsertPostgresGeoTypesAsync(new QuerySql.InsertPostgresGeoTypesArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }); var expected = new QuerySql.GetPostgresGeoTypesRow { CPoint = cPoint, @@ -835,7 +835,7 @@ public async Task TestPostgresGeoTypes(NpgsqlPoint? cPoint, NpgsqlLine? cLine, N CPolygon = cPolygon, CCircle = cCircle }; - var actual = await QuerySql.GetPostgresGeoTypes(); + var actual = await QuerySql.GetPostgresGeoTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgresGeoTypesRow y) @@ -884,7 +884,7 @@ private static IEnumerable PostgresGeoCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresGeoCopyFromTestCases))] - public async Task TestPostgresGeoCopyFrom( + public async Task TestPostgresGeoCopyFromAsync( int batchSize, NpgsqlPoint? cPoint, NpgsqlLine? cLine, @@ -906,7 +906,7 @@ public async Task TestPostgresGeoCopyFrom( CCircle = cCircle }) .ToList(); - await QuerySql.InsertPostgresGeoTypesBatch(batchArgs); + await QuerySql.InsertPostgresGeoTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresGeoTypesRow { CPoint = cPoint, @@ -917,7 +917,7 @@ public async Task TestPostgresGeoCopyFrom( CPolygon = cPolygon, CCircle = cCircle }; - var actual = await QuerySql.GetPostgresGeoTypes(); + var actual = await QuerySql.GetPostgresGeoTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgresGeoTypesRow y) @@ -937,16 +937,16 @@ void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgre { Impl = $$""" [Test] - public async Task TestPostgresTransaction() + public async Task TestPostgresTransactionAsync() { var connection = new Npgsql.NpgsqlConnection(Environment.GetEnvironmentVariable(EndToEndCommon.PostgresConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = {{Consts.BojackId}}, Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = {{Consts.BojackId}}, Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); ClassicAssert.IsNull(actual); await transaction.CommitAsync(); @@ -957,7 +957,7 @@ public async Task TestPostgresTransaction() Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) @@ -973,18 +973,18 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { Impl = $$""" [Test] - public async Task TestPostgresTransactionRollback() + public async Task TestPostgresTransactionRollbackAsync() { var connection = new Npgsql.NpgsqlConnection(Environment.GetEnvironmentVariable(EndToEndCommon.PostgresConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var sqlQueryWithTx = QuerySql.WithTransaction(transaction); - await sqlQueryWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = {{Consts.BojackId}}, Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }); + await sqlQueryWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = {{Consts.BojackId}}, Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }); await transaction.RollbackAsync(); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); ClassicAssert.IsNull(actual); } """ @@ -995,20 +995,20 @@ public async Task TestPostgresTransactionRollback() [Test] [TestCase(-54355, "White Light from the Mouth of Infinity", "2022-10-2 15:44:01+09:00")] [TestCase(null, null, "1970-01-01 00:00:00")] - public async Task TestPostgresDataTypesOverride( + public async Task TestPostgresDataTypesOverrideAsync( int? cInteger, string cVarchar, DateTime cTimestamp) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CInteger = cInteger }); - await QuerySql.InsertPostgresDateTimeTypes(new QuerySql.InsertPostgresDateTimeTypesArgs + await QuerySql.InsertPostgresDateTimeTypesAsync(new QuerySql.InsertPostgresDateTimeTypesArgs { CTimestamp = cTimestamp }); - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CVarchar = cVarchar }); @@ -1020,7 +1020,7 @@ await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesA MaxTimestamp = cTimestamp }; - var actual = await QuerySql.GetPostgresFunctions(); + var actual = await QuerySql.GetPostgresFunctionsAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresFunctionsRow x, QuerySql.GetPostgresFunctionsRow y) @@ -1046,9 +1046,9 @@ private static IEnumerable PostgresGuidDataTypesTestCases [Test] [TestCaseSource(nameof(PostgresGuidDataTypesTestCases))] - public async Task TestPostgresGuidDataTypes(Guid? cUuid) + public async Task TestPostgresGuidDataTypesAsync(Guid? cUuid) { - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CUuid = cUuid }); @@ -1057,7 +1057,7 @@ await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialType { CUuid = cUuid }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) @@ -1081,7 +1081,7 @@ private static IEnumerable PostgresGuidCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresGuidCopyFromTestCases))] - public async Task TestPostgresGuidCopyFrom(int batchSize, Guid? cUuid) + public async Task TestPostgresGuidCopyFromAsync(int batchSize, Guid? cUuid) { var batchArgs = Enumerable.Range(0, batchSize) .Select(_ => new QuerySql.InsertPostgresSpecialTypesBatchArgs @@ -1089,14 +1089,14 @@ public async Task TestPostgresGuidCopyFrom(int batchSize, Guid? cUuid) CUuid = cUuid }) .ToList(); - await QuerySql.InsertPostgresSpecialTypesBatch(batchArgs); + await QuerySql.InsertPostgresSpecialTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresSpecialTypesCntRow { Cnt = batchSize, CUuid = cUuid }; - var actual = await QuerySql.GetPostgresSpecialTypesCnt(); + var actual = await QuerySql.GetPostgresSpecialTypesCntAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.GetPostgresSpecialTypesCntRow y) @@ -1113,7 +1113,7 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.Get [Test] [TestCase("Good morning xml, the world says hello")] [TestCase(null)] - public async Task TestPostgresXmlDataTypes(string cXml) + public async Task TestPostgresXmlDataTypesAsync(string cXml) { XmlDocument parsedXml = null; if (cXml != null) @@ -1122,7 +1122,7 @@ public async Task TestPostgresXmlDataTypes(string cXml) parsedXml.LoadXml(cXml); } - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CXml = parsedXml }); @@ -1132,7 +1132,7 @@ await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialType CXml = parsedXml }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) @@ -1152,7 +1152,7 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos public void TestPostgresInvalidXml() { Assert.ThrowsAsync(async () => await - QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs + QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CXmlStringOverride = "SOME INVALID XML" })); @@ -1183,7 +1183,7 @@ private static IEnumerable PostgresNetworkCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresNetworkCopyFromTestCases))] - public async Task TestPostgresNetworkCopyFrom( + public async Task TestPostgresNetworkCopyFromAsync( int batchSize, NpgsqlCidr? cCidr, IPAddress cInet, @@ -1197,7 +1197,7 @@ public async Task TestPostgresNetworkCopyFrom( CMacaddr = cMacaddr }) .ToList(); - await QuerySql.InsertPostgresNetworkTypesBatch(batchArgs); + await QuerySql.InsertPostgresNetworkTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNetworkTypesCntRow { @@ -1206,7 +1206,7 @@ public async Task TestPostgresNetworkCopyFrom( CInet = cInet, CMacaddr = cMacaddr }; - var actual = await QuerySql.GetPostgresNetworkTypesCnt(); + var actual = await QuerySql.GetPostgresNetworkTypesCntAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresNetworkTypesCntRow x, QuerySql.GetPostgresNetworkTypesCntRow y) @@ -1227,9 +1227,9 @@ void AssertSingularEquals(QuerySql.GetPostgresNetworkTypesCntRow x, QuerySql.Get [TestCase(CEnum.Medium)] [TestCase(CEnum.Big)] [TestCase(null)] - public async Task TestPostgresEnumTypes(CEnum? cEnum) + public async Task TestPostgresEnumTypesAsync(CEnum? cEnum) { - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CEnum = cEnum }); @@ -1238,7 +1238,7 @@ await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialType { CEnum = cEnum }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) @@ -1253,9 +1253,9 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos Impl = $$""" [Test] [TestCase(CEnum.Small)] - public async Task TestPostgresNotNullTypes(CEnum cEnumNotNull) + public async Task TestPostgresNotNullTypesAsync(CEnum cEnumNotNull) { - await QuerySql.InsertPostgresNotNullTypes(new QuerySql.InsertPostgresNotNullTypesArgs + await QuerySql.InsertPostgresNotNullTypesAsync(new QuerySql.InsertPostgresNotNullTypesArgs { CEnumNotNull = cEnumNotNull }); @@ -1264,7 +1264,7 @@ await QuerySql.InsertPostgresNotNullTypes(new QuerySql.InsertPostgresNotNullType { CEnumNotNull = cEnumNotNull }; - var actual = await QuerySql.GetPostgresNotNullTypes(); + var actual = await QuerySql.GetPostgresNotNullTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetPostgresNotNullTypesRow x, QuerySql.GetPostgresNotNullTypesRow y) @@ -1279,14 +1279,14 @@ void AssertSingularEquals(QuerySql.GetPostgresNotNullTypesRow x, QuerySql.GetPos Impl = $$""" [Test] [Obsolete] // due to NpgsqlTsVector.Parse usage - public async Task TestPostgresFullTextSearchDataTypes() + public async Task TestPostgresFullTextSearchDataTypesAsync() { - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CText = "Hello world" }); - var actual = await QuerySql.GetPostgresStringTypesTextSearch( + var actual = await QuerySql.GetPostgresStringTypesTextSearchAsync( new QuerySql.GetPostgresStringTypesTextSearchArgs { ToTsquery = "Hello" }); var expected = new QuerySql.GetPostgresStringTypesTextSearchRow diff --git a/end2end/EndToEndScaffold/Templates/SqliteTests.cs b/end2end/EndToEndScaffold/Templates/SqliteTests.cs index 2b264fae..b941b487 100644 --- a/end2end/EndToEndScaffold/Templates/SqliteTests.cs +++ b/end2end/EndToEndScaffold/Templates/SqliteTests.cs @@ -38,7 +38,7 @@ private static IEnumerable SqliteTypesTestCases [Test] [TestCaseSource(nameof(SqliteTypesTestCases))] - public async Task TestSqliteTypes( + public async Task TestSqliteTypesAsync( int? cInteger, decimal? cReal, string cText, @@ -50,7 +50,7 @@ public async Task TestSqliteTypes( Instant? cTextNodaInstantOverride, Instant? cIntegerNodaInstantOverride) { - await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs + await QuerySql.InsertSqliteTypesAsync(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, @@ -77,7 +77,7 @@ await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }; - var actual = await QuerySql.GetSqliteTypes(); + var actual = await QuerySql.GetSqliteTypesAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetSqliteTypesRow x, QuerySql.GetSqliteTypesRow y) @@ -103,7 +103,7 @@ void AssertSingularEquals(QuerySql.GetSqliteTypesRow x, QuerySql.GetSqliteTypesR [TestCase(100, 312, -7541.3309, "Johnny B. Good")] [TestCase(500, -768, 8453.5678, "Bad to the Bone")] [TestCase(10, null, null, null)] - public async Task TestCopyFrom( + public async Task TestCopyFromAsync( int batchSize, int? cInteger, decimal? cReal, @@ -117,7 +117,7 @@ public async Task TestCopyFrom( CText = cText }) .ToList(); - await QuerySql.InsertSqliteTypesBatch(batchArgs); + await QuerySql.InsertSqliteTypesBatchAsync(batchArgs); var expected = new QuerySql.GetSqliteTypesCntRow { Cnt = batchSize, @@ -125,7 +125,7 @@ public async Task TestCopyFrom( CReal = cReal, CText = cText }; - var actual = await QuerySql.GetSqliteTypesCnt(); + var actual = await QuerySql.GetSqliteTypesCntAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetSqliteTypesCntRow x, QuerySql.GetSqliteTypesCntRow y) @@ -142,16 +142,16 @@ void AssertSingularEquals(QuerySql.GetSqliteTypesCntRow x, QuerySql.GetSqliteTyp { Impl = $$""" [Test] - public async Task TestSqliteTransaction() + public async Task TestSqliteTransactionAsync() { var connection = new Microsoft.Data.Sqlite.SqliteConnection(Environment.GetEnvironmentVariable(EndToEndCommon.SqliteConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = {{Consts.BojackId}}, Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = {{Consts.BojackId}}, Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); ClassicAssert.IsNull(actual); transaction.Commit(); @@ -162,7 +162,7 @@ public async Task TestSqliteTransaction() Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) @@ -178,18 +178,18 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { Impl = $$""" [Test] - public async Task TestSqliteTransactionRollback() + public async Task TestSqliteTransactionRollbackAsync() { var connection = new Microsoft.Data.Sqlite.SqliteConnection(Environment.GetEnvironmentVariable(EndToEndCommon.SqliteConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var sqlQueryWithTx = QuerySql.WithTransaction(transaction); - await sqlQueryWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = {{Consts.BojackId}}, Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }); + await sqlQueryWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = {{Consts.BojackId}}, Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }); transaction.Rollback(); - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = {{Consts.BojackAuthor}} }); ClassicAssert.IsNull(actual); } """ @@ -200,12 +200,12 @@ public async Task TestSqliteTransactionRollback() [Test] [TestCase(-54355, 9787.66, "Have One On Me")] [TestCase(null, 0.0, null)] - public async Task TestSqliteDataTypesOverride( + public async Task TestSqliteDataTypesOverrideAsync( int? cInteger, decimal cReal, string cText) { - await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs + await QuerySql.InsertSqliteTypesAsync(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, @@ -218,7 +218,7 @@ await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs MaxReal = cReal, MaxText = cText }; - var actual = await QuerySql.GetSqliteFunctions(); + var actual = await QuerySql.GetSqliteFunctionsAsync(); AssertSingularEquals(expected, actual{{Consts.UnknownRecordValuePlaceholder}}); void AssertSingularEquals(QuerySql.GetSqliteFunctionsRow x, QuerySql.GetSqliteFunctionsRow y) @@ -234,7 +234,7 @@ void AssertSingularEquals(QuerySql.GetSqliteFunctionsRow x, QuerySql.GetSqliteFu { Impl = $$""" [Test] - public async Task TestGetAuthorByIdWithMultipleNamedParam() + public async Task TestGetAuthorByIdWithMultipleNamedParamAsync() { {{Consts.CreateBojackAuthor}} var expected = new QuerySql.GetAuthorByIdWithMultipleNamedParamRow @@ -243,7 +243,7 @@ public async Task TestGetAuthorByIdWithMultipleNamedParam() Name = {{Consts.BojackAuthor}}, Bio = {{Consts.BojackTheme}} }; - var actual = await this.QuerySql.GetAuthorByIdWithMultipleNamedParam(new QuerySql.GetAuthorByIdWithMultipleNamedParamArgs + var actual = await this.QuerySql.GetAuthorByIdWithMultipleNamedParamAsync(new QuerySql.GetAuthorByIdWithMultipleNamedParamArgs { IdArg = {{Consts.BojackId}}, Take = 1 diff --git a/end2end/EndToEndTests/MySqlConnectorDapperTester.cs b/end2end/EndToEndTests/MySqlConnectorDapperTester.cs index 6abddaf9..473a5119 100644 --- a/end2end/EndToEndTests/MySqlConnectorDapperTester.cs +++ b/end2end/EndToEndTests/MySqlConnectorDapperTester.cs @@ -13,11 +13,11 @@ public partial class MySqlConnectorDapperTester [TearDown] public async Task EmptyTestsTable() { - await QuerySql.DeleteAllAuthors(); - await QuerySql.TruncateExtendedBios(); - await QuerySql.TruncateMysqlNumericTypes(); - await QuerySql.TruncateMysqlStringTypes(); - await QuerySql.TruncateMysqlDatetimeTypes(); - await QuerySql.TruncateMysqlBinaryTypes(); + await QuerySql.DeleteAllAuthorsAsync(); + await QuerySql.TruncateExtendedBiosAsync(); + await QuerySql.TruncateMysqlNumericTypesAsync(); + await QuerySql.TruncateMysqlStringTypesAsync(); + await QuerySql.TruncateMysqlDatetimeTypesAsync(); + await QuerySql.TruncateMysqlBinaryTypesAsync(); } } \ No newline at end of file diff --git a/end2end/EndToEndTests/MySqlConnectorDapperTester.generated.cs b/end2end/EndToEndTests/MySqlConnectorDapperTester.generated.cs index 5be30570..7f517e84 100644 --- a/end2end/EndToEndTests/MySqlConnectorDapperTester.generated.cs +++ b/end2end/EndToEndTests/MySqlConnectorDapperTester.generated.cs @@ -14,17 +14,17 @@ namespace EndToEndTests public partial class MySqlConnectorDapperTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -35,10 +35,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -54,7 +54,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -72,21 +72,21 @@ void AssertSequenceEquals(List x, List { @@ -103,7 +103,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -121,16 +121,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -163,7 +163,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -184,12 +184,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -223,7 +223,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -244,28 +244,28 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -281,7 +281,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -299,10 +299,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -312,7 +312,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -336,8 +336,8 @@ public async Task TestMySqlTransaction() await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); await transaction.CommitAsync(); var expected = new QuerySql.GetAuthorRow @@ -346,7 +346,7 @@ public async Task TestMySqlTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -363,9 +363,9 @@ public async Task TestMySqlTransactionRollback() await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); await transaction.RollbackAsync(); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } @@ -374,16 +374,16 @@ public async Task TestMySqlTransactionRollback() [TestCase(null, null, "1971-01-01 00:00:00")] public async Task TestMySqlDataTypesOverride(int? cInt, string cVarchar, DateTime cTimestamp) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CInt = cInt }); - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CVarchar = cVarchar }); - await QuerySql.InsertMysqlDatetimeTypes(new QuerySql.InsertMysqlDatetimeTypesArgs { CTimestamp = cTimestamp }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CInt = cInt }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CVarchar = cVarchar }); + await QuerySql.InsertMysqlDatetimeTypesAsync(new QuerySql.InsertMysqlDatetimeTypesArgs { CTimestamp = cTimestamp }); var expected = new QuerySql.GetMysqlFunctionsRow { MaxInt = cInt, MaxVarchar = cVarchar, MaxTimestamp = cTimestamp }; - var actual = await QuerySql.GetMysqlFunctions(); + var actual = await QuerySql.GetMysqlFunctionsAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlFunctionsRow x, QuerySql.GetMysqlFunctionsRow y) { @@ -396,7 +396,7 @@ void AssertSingularEquals(QuerySql.GetMysqlFunctionsRow x, QuerySql.GetMysqlFunc [Test] public async Task TestMySqlScopedSchemaEnum() { - await this.QuerySql.CreateExtendedBio(new QuerySql.CreateExtendedBioArgs { AuthorName = "Bojack Horseman", Name = "One Trick Pony", BioType = BiosBioType.Memoir, AuthorType = new HashSet { BiosAuthorType.Author, BiosAuthorType.Translator } }); + await this.QuerySql.CreateExtendedBioAsync(new QuerySql.CreateExtendedBioArgs { AuthorName = "Bojack Horseman", Name = "One Trick Pony", BioType = BiosBioType.Memoir, AuthorType = new HashSet { BiosAuthorType.Author, BiosAuthorType.Translator } }); var expected = new QuerySql.GetFirstExtendedBioByTypeRow { AuthorName = "Bojack Horseman", @@ -408,7 +408,7 @@ public async Task TestMySqlScopedSchemaEnum() BiosAuthorType.Translator } }; - var actual = await this.QuerySql.GetFirstExtendedBioByType(new QuerySql.GetFirstExtendedBioByTypeArgs { BioType = BiosBioType.Memoir }); + var actual = await this.QuerySql.GetFirstExtendedBioByTypeAsync(new QuerySql.GetFirstExtendedBioByTypeArgs { BioType = BiosBioType.Memoir }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetFirstExtendedBioByTypeRow x, QuerySql.GetFirstExtendedBioByTypeRow y) { @@ -422,7 +422,7 @@ void AssertSingularEquals(QuerySql.GetFirstExtendedBioByTypeRow x, QuerySql.GetF [Test] public void TestMySqlInvalidJson() { - Assert.ThrowsAsync(async () => await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); } [Test] @@ -430,7 +430,7 @@ public void TestMySqlInvalidJson() [TestCase(null, null, null, null, null, null, null, null)] public async Task TestMySqlStringTypes(string cChar, string cNchar, string cNationalChar, string cVarchar, string cTinytext, string cMediumtext, string cText, string cLongtext) { - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }); var expected = new QuerySql.GetMysqlStringTypesRow { CChar = cChar, @@ -442,7 +442,7 @@ public async Task TestMySqlStringTypes(string cChar, string cNchar, string cNati CText = cText, CLongtext = cLongtext }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -462,7 +462,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlSt [TestCase(null, null, null, null, null, null, null, null, null)] public async Task TestMySqlIntegerTypes(bool? cBool, bool? cBoolean, short? cTinyint, short? cYear, short? cSmallint, int? cMediumint, int? cInt, int? cInteger, long? cBigint) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }); var expected = new QuerySql.GetMysqlNumericTypesRow { CBool = cBool, @@ -474,7 +474,7 @@ public async Task TestMySqlIntegerTypes(bool? cBool, bool? cBoolean, short? cTin CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetMysqlNumericTypes(); + var actual = await QuerySql.GetMysqlNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlNumericTypesRow y) { @@ -494,7 +494,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlN [TestCase(null, null, null, null, null, null, null)] public async Task TestMySqlFloatingPointTypes(float? cFloat, decimal? cNumeric, decimal? cDecimal, decimal? cDec, decimal? cFixed, double? cDouble, double? cDoublePrecision) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }); var expected = new QuerySql.GetMysqlNumericTypesRow { CFloat = cFloat, @@ -505,7 +505,7 @@ public async Task TestMySqlFloatingPointTypes(float? cFloat, decimal? cNumeric, CDouble = cDouble, CDoublePrecision = cDoublePrecision }; - var actual = await QuerySql.GetMysqlNumericTypes(); + var actual = await QuerySql.GetMysqlNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlNumericTypesRow y) { @@ -532,7 +532,7 @@ private static IEnumerable MySqlDateTimeTypesTestCases [TestCaseSource(nameof(MySqlDateTimeTypesTestCases))] public async Task TestMySqlDateTimeTypes(short? cYear, DateTime? cDate, DateTime? cDatetime, DateTime? cTimestamp, TimeSpan? cTime, Instant? cTimestampNodaInstantOverride) { - await QuerySql.InsertMysqlDatetimeTypes(new QuerySql.InsertMysqlDatetimeTypesArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); + await QuerySql.InsertMysqlDatetimeTypesAsync(new QuerySql.InsertMysqlDatetimeTypesArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); var expected = new QuerySql.GetMysqlDatetimeTypesRow { CYear = cYear, @@ -542,7 +542,7 @@ public async Task TestMySqlDateTimeTypes(short? cYear, DateTime? cDate, DateTime CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }; - var actual = await QuerySql.GetMysqlDatetimeTypes(); + var actual = await QuerySql.GetMysqlDatetimeTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesRow x, QuerySql.GetMysqlDatetimeTypesRow y) { @@ -561,7 +561,7 @@ void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesRow x, QuerySql.GetMysql [TestCase(null, null, null, null, null, null, null)] public async Task TestMySqlBinaryTypes(byte? cBit, byte[] cBinary, byte[] cVarbinary, byte[] cTinyblob, byte[] cBlob, byte[] cMediumblob, byte[] cLongblob) { - await QuerySql.InsertMysqlBinaryTypes(new QuerySql.InsertMysqlBinaryTypesArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }); + await QuerySql.InsertMysqlBinaryTypesAsync(new QuerySql.InsertMysqlBinaryTypesArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }); var expected = new QuerySql.GetMysqlBinaryTypesRow { CBit = cBit, @@ -572,7 +572,7 @@ public async Task TestMySqlBinaryTypes(byte? cBit, byte[] cBinary, byte[] cVarbi CMediumblob = cMediumblob, CLongblob = cLongblob }; - var actual = await QuerySql.GetMysqlBinaryTypes(); + var actual = await QuerySql.GetMysqlBinaryTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlBinaryTypesRow x, QuerySql.GetMysqlBinaryTypesRow y) { @@ -599,13 +599,13 @@ private static IEnumerable MySqlEnumTypesTestCases [TestCaseSource(nameof(MySqlEnumTypesTestCases))] public async Task TestMySqlStringTypes(MysqlStringTypesCEnum? cEnum, HashSet cSet) { - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CEnum = cEnum, CSet = cSet }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CEnum = cEnum, CSet = cSet }); var expected = new QuerySql.GetMysqlStringTypesRow { CEnum = cEnum, CSet = cSet }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -622,13 +622,13 @@ public async Task TestMySqlJsonDataType(string cJson) JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CJson = cParsedJson, CJsonStringOverride = cJson }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CJson = cParsedJson, CJsonStringOverride = cJson }); var expected = new QuerySql.GetMysqlStringTypesRow { CJson = cParsedJson, CJsonStringOverride = cJson }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -645,7 +645,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlSt public async Task TestStringCopyFrom(int batchSize, string cChar, string cNchar, string cNationalChar, string cVarchar, string cTinytext, string cMediumtext, string cText, string cLongtext) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, @@ -658,7 +658,7 @@ public async Task TestStringCopyFrom(int batchSize, string cChar, string cNchar, CText = cText, CLongtext = cLongtext }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { @@ -680,7 +680,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysq public async Task TestIntegerCopyFrom(int batchSize, bool? cBool, bool? cBoolean, short? cTinyint, short? cSmallint, int? cMediumint, int? cInt, int? cInteger, long? cBigint) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlNumericTypesBatchArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }).ToList(); - await QuerySql.InsertMysqlNumericTypesBatch(batchArgs); + await QuerySql.InsertMysqlNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlNumericTypesCntRow { Cnt = batchSize, @@ -693,7 +693,7 @@ public async Task TestIntegerCopyFrom(int batchSize, bool? cBool, bool? cBoolean CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetMysqlNumericTypesCnt(); + var actual = await QuerySql.GetMysqlNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMysqlNumericTypesCntRow y) { @@ -715,7 +715,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMys public async Task TestFloatingPointCopyFrom(int batchSize, float? cFloat, decimal? cNumeric, decimal? cDecimal, decimal? cDec, decimal? cFixed, double? cDouble, double? cDoublePrecision) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlNumericTypesBatchArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }).ToList(); - await QuerySql.InsertMysqlNumericTypesBatch(batchArgs); + await QuerySql.InsertMysqlNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlNumericTypesCntRow { Cnt = batchSize, @@ -727,7 +727,7 @@ public async Task TestFloatingPointCopyFrom(int batchSize, float? cFloat, decima CDouble = cDouble, CDoublePrecision = cDoublePrecision }; - var actual = await QuerySql.GetMysqlNumericTypesCnt(); + var actual = await QuerySql.GetMysqlNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMysqlNumericTypesCntRow y) { @@ -748,7 +748,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMys public async Task TestDateTimeCopyFrom(int batchSize, short? cYear, DateTime? cDate, DateTime? cDatetime, DateTime? cTimestamp, TimeSpan? cTime) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlDatetimeTypesBatchArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime }).ToList(); - await QuerySql.InsertMysqlDatetimeTypesBatch(batchArgs); + await QuerySql.InsertMysqlDatetimeTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlDatetimeTypesCntRow { Cnt = batchSize, @@ -758,7 +758,7 @@ public async Task TestDateTimeCopyFrom(int batchSize, short? cYear, DateTime? cD CTimestamp = cTimestamp, CTime = cTime }; - var actual = await QuerySql.GetMysqlDatetimeTypesCnt(); + var actual = await QuerySql.GetMysqlDatetimeTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesCntRow x, QuerySql.GetMysqlDatetimeTypesCntRow y) { @@ -778,7 +778,7 @@ void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesCntRow x, QuerySql.GetMy public async Task TestBinaryCopyFrom(int batchSize, byte? cBit, byte[] cBinary, byte[] cVarbinary, byte[] cTinyblob, byte[] cBlob, byte[] cMediumblob, byte[] cLongblob) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlBinaryTypesBatchArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }).ToList(); - await QuerySql.InsertMysqlBinaryTypesBatch(batchArgs); + await QuerySql.InsertMysqlBinaryTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlBinaryTypesCntRow { Cnt = batchSize, @@ -790,7 +790,7 @@ public async Task TestBinaryCopyFrom(int batchSize, byte? cBit, byte[] cBinary, CMediumblob = cMediumblob, CLongblob = cLongblob }; - var actual = await QuerySql.GetMysqlBinaryTypesCnt(); + var actual = await QuerySql.GetMysqlBinaryTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlBinaryTypesCntRow x, QuerySql.GetMysqlBinaryTypesCntRow y) { @@ -819,14 +819,14 @@ private static IEnumerable MySqlEnumCopyFromTestCases public async Task TestCopyFrom(int batchSize, MysqlStringTypesCEnum? cEnum, HashSet cSet) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CEnum = cEnum, CSet = cSet }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, CEnum = cEnum, CSet = cSet }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { @@ -845,13 +845,13 @@ public async Task TestJsonCopyFrom(int batchSize, string cJson) if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CJson = cParsedJson }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, CJson = cParsedJson }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { diff --git a/end2end/EndToEndTests/MySqlConnectorTester.cs b/end2end/EndToEndTests/MySqlConnectorTester.cs index dfa6f154..3b0907eb 100644 --- a/end2end/EndToEndTests/MySqlConnectorTester.cs +++ b/end2end/EndToEndTests/MySqlConnectorTester.cs @@ -13,11 +13,11 @@ public partial class MySqlConnectorTester [TearDown] public async Task EmptyTestsTable() { - await QuerySql.DeleteAllAuthors(); - await QuerySql.TruncateExtendedBios(); - await QuerySql.TruncateMysqlNumericTypes(); - await QuerySql.TruncateMysqlStringTypes(); - await QuerySql.TruncateMysqlDatetimeTypes(); - await QuerySql.TruncateMysqlBinaryTypes(); + await QuerySql.DeleteAllAuthorsAsync(); + await QuerySql.TruncateExtendedBiosAsync(); + await QuerySql.TruncateMysqlNumericTypesAsync(); + await QuerySql.TruncateMysqlStringTypesAsync(); + await QuerySql.TruncateMysqlDatetimeTypesAsync(); + await QuerySql.TruncateMysqlBinaryTypesAsync(); } } \ No newline at end of file diff --git a/end2end/EndToEndTests/MySqlConnectorTester.generated.cs b/end2end/EndToEndTests/MySqlConnectorTester.generated.cs index 1510db11..7db6fec8 100644 --- a/end2end/EndToEndTests/MySqlConnectorTester.generated.cs +++ b/end2end/EndToEndTests/MySqlConnectorTester.generated.cs @@ -14,17 +14,17 @@ namespace EndToEndTests public partial class MySqlConnectorTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -35,10 +35,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -54,7 +54,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -72,21 +72,21 @@ void AssertSequenceEquals(List x, List { @@ -103,7 +103,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -121,16 +121,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -163,7 +163,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -184,12 +184,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -223,7 +223,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -244,28 +244,28 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -281,7 +281,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -299,10 +299,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -312,7 +312,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -336,8 +336,8 @@ public async Task TestMySqlTransaction() await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); await transaction.CommitAsync(); var expected = new QuerySql.GetAuthorRow @@ -346,7 +346,7 @@ public async Task TestMySqlTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -363,9 +363,9 @@ public async Task TestMySqlTransactionRollback() await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); await transaction.RollbackAsync(); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } @@ -374,16 +374,16 @@ public async Task TestMySqlTransactionRollback() [TestCase(null, null, "1971-01-01 00:00:00")] public async Task TestMySqlDataTypesOverride(int? cInt, string cVarchar, DateTime cTimestamp) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CInt = cInt }); - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CVarchar = cVarchar }); - await QuerySql.InsertMysqlDatetimeTypes(new QuerySql.InsertMysqlDatetimeTypesArgs { CTimestamp = cTimestamp }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CInt = cInt }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CVarchar = cVarchar }); + await QuerySql.InsertMysqlDatetimeTypesAsync(new QuerySql.InsertMysqlDatetimeTypesArgs { CTimestamp = cTimestamp }); var expected = new QuerySql.GetMysqlFunctionsRow { MaxInt = cInt, MaxVarchar = cVarchar, MaxTimestamp = cTimestamp }; - var actual = await QuerySql.GetMysqlFunctions(); + var actual = await QuerySql.GetMysqlFunctionsAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlFunctionsRow x, QuerySql.GetMysqlFunctionsRow y) { @@ -396,7 +396,7 @@ void AssertSingularEquals(QuerySql.GetMysqlFunctionsRow x, QuerySql.GetMysqlFunc [Test] public async Task TestMySqlScopedSchemaEnum() { - await this.QuerySql.CreateExtendedBio(new QuerySql.CreateExtendedBioArgs { AuthorName = "Bojack Horseman", Name = "One Trick Pony", BioType = BiosBioType.Memoir, AuthorType = new HashSet { BiosAuthorType.Author, BiosAuthorType.Translator } }); + await this.QuerySql.CreateExtendedBioAsync(new QuerySql.CreateExtendedBioArgs { AuthorName = "Bojack Horseman", Name = "One Trick Pony", BioType = BiosBioType.Memoir, AuthorType = new HashSet { BiosAuthorType.Author, BiosAuthorType.Translator } }); var expected = new QuerySql.GetFirstExtendedBioByTypeRow { AuthorName = "Bojack Horseman", @@ -408,7 +408,7 @@ public async Task TestMySqlScopedSchemaEnum() BiosAuthorType.Translator } }; - var actual = await this.QuerySql.GetFirstExtendedBioByType(new QuerySql.GetFirstExtendedBioByTypeArgs { BioType = BiosBioType.Memoir }); + var actual = await this.QuerySql.GetFirstExtendedBioByTypeAsync(new QuerySql.GetFirstExtendedBioByTypeArgs { BioType = BiosBioType.Memoir }); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetFirstExtendedBioByTypeRow x, QuerySql.GetFirstExtendedBioByTypeRow y) { @@ -422,7 +422,7 @@ void AssertSingularEquals(QuerySql.GetFirstExtendedBioByTypeRow x, QuerySql.GetF [Test] public void TestMySqlInvalidJson() { - Assert.ThrowsAsync(async () => await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); } [Test] @@ -430,7 +430,7 @@ public void TestMySqlInvalidJson() [TestCase(null, null, null, null, null, null, null, null)] public async Task TestMySqlStringTypes(string cChar, string cNchar, string cNationalChar, string cVarchar, string cTinytext, string cMediumtext, string cText, string cLongtext) { - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }); var expected = new QuerySql.GetMysqlStringTypesRow { CChar = cChar, @@ -442,7 +442,7 @@ public async Task TestMySqlStringTypes(string cChar, string cNchar, string cNati CText = cText, CLongtext = cLongtext }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -462,7 +462,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlSt [TestCase(null, null, null, null, null, null, null, null, null)] public async Task TestMySqlIntegerTypes(bool? cBool, bool? cBoolean, short? cTinyint, short? cYear, short? cSmallint, int? cMediumint, int? cInt, int? cInteger, long? cBigint) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }); var expected = new QuerySql.GetMysqlNumericTypesRow { CBool = cBool, @@ -474,7 +474,7 @@ public async Task TestMySqlIntegerTypes(bool? cBool, bool? cBoolean, short? cTin CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetMysqlNumericTypes(); + var actual = await QuerySql.GetMysqlNumericTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlNumericTypesRow y) { @@ -494,7 +494,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlN [TestCase(null, null, null, null, null, null, null)] public async Task TestMySqlFloatingPointTypes(float? cFloat, decimal? cNumeric, decimal? cDecimal, decimal? cDec, decimal? cFixed, double? cDouble, double? cDoublePrecision) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }); var expected = new QuerySql.GetMysqlNumericTypesRow { CFloat = cFloat, @@ -505,7 +505,7 @@ public async Task TestMySqlFloatingPointTypes(float? cFloat, decimal? cNumeric, CDouble = cDouble, CDoublePrecision = cDoublePrecision }; - var actual = await QuerySql.GetMysqlNumericTypes(); + var actual = await QuerySql.GetMysqlNumericTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlNumericTypesRow y) { @@ -532,7 +532,7 @@ private static IEnumerable MySqlDateTimeTypesTestCases [TestCaseSource(nameof(MySqlDateTimeTypesTestCases))] public async Task TestMySqlDateTimeTypes(short? cYear, DateTime? cDate, DateTime? cDatetime, DateTime? cTimestamp, TimeSpan? cTime, Instant? cTimestampNodaInstantOverride) { - await QuerySql.InsertMysqlDatetimeTypes(new QuerySql.InsertMysqlDatetimeTypesArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); + await QuerySql.InsertMysqlDatetimeTypesAsync(new QuerySql.InsertMysqlDatetimeTypesArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); var expected = new QuerySql.GetMysqlDatetimeTypesRow { CYear = cYear, @@ -542,7 +542,7 @@ public async Task TestMySqlDateTimeTypes(short? cYear, DateTime? cDate, DateTime CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }; - var actual = await QuerySql.GetMysqlDatetimeTypes(); + var actual = await QuerySql.GetMysqlDatetimeTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesRow x, QuerySql.GetMysqlDatetimeTypesRow y) { @@ -561,7 +561,7 @@ void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesRow x, QuerySql.GetMysql [TestCase(null, null, null, null, null, null, null)] public async Task TestMySqlBinaryTypes(byte? cBit, byte[] cBinary, byte[] cVarbinary, byte[] cTinyblob, byte[] cBlob, byte[] cMediumblob, byte[] cLongblob) { - await QuerySql.InsertMysqlBinaryTypes(new QuerySql.InsertMysqlBinaryTypesArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }); + await QuerySql.InsertMysqlBinaryTypesAsync(new QuerySql.InsertMysqlBinaryTypesArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }); var expected = new QuerySql.GetMysqlBinaryTypesRow { CBit = cBit, @@ -572,7 +572,7 @@ public async Task TestMySqlBinaryTypes(byte? cBit, byte[] cBinary, byte[] cVarbi CMediumblob = cMediumblob, CLongblob = cLongblob }; - var actual = await QuerySql.GetMysqlBinaryTypes(); + var actual = await QuerySql.GetMysqlBinaryTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlBinaryTypesRow x, QuerySql.GetMysqlBinaryTypesRow y) { @@ -599,13 +599,13 @@ private static IEnumerable MySqlEnumTypesTestCases [TestCaseSource(nameof(MySqlEnumTypesTestCases))] public async Task TestMySqlStringTypes(MysqlStringTypesCEnum? cEnum, HashSet cSet) { - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CEnum = cEnum, CSet = cSet }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CEnum = cEnum, CSet = cSet }); var expected = new QuerySql.GetMysqlStringTypesRow { CEnum = cEnum, CSet = cSet }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -622,13 +622,13 @@ public async Task TestMySqlJsonDataType(string cJson) JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CJson = cParsedJson, CJsonStringOverride = cJson }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CJson = cParsedJson, CJsonStringOverride = cJson }); var expected = new QuerySql.GetMysqlStringTypesRow { CJson = cParsedJson, CJsonStringOverride = cJson }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -645,7 +645,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlSt public async Task TestStringCopyFrom(int batchSize, string cChar, string cNchar, string cNationalChar, string cVarchar, string cTinytext, string cMediumtext, string cText, string cLongtext) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, @@ -658,7 +658,7 @@ public async Task TestStringCopyFrom(int batchSize, string cChar, string cNchar, CText = cText, CLongtext = cLongtext }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { @@ -680,7 +680,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysq public async Task TestIntegerCopyFrom(int batchSize, bool? cBool, bool? cBoolean, short? cTinyint, short? cSmallint, int? cMediumint, int? cInt, int? cInteger, long? cBigint) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlNumericTypesBatchArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }).ToList(); - await QuerySql.InsertMysqlNumericTypesBatch(batchArgs); + await QuerySql.InsertMysqlNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlNumericTypesCntRow { Cnt = batchSize, @@ -693,7 +693,7 @@ public async Task TestIntegerCopyFrom(int batchSize, bool? cBool, bool? cBoolean CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetMysqlNumericTypesCnt(); + var actual = await QuerySql.GetMysqlNumericTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMysqlNumericTypesCntRow y) { @@ -715,7 +715,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMys public async Task TestFloatingPointCopyFrom(int batchSize, float? cFloat, decimal? cNumeric, decimal? cDecimal, decimal? cDec, decimal? cFixed, double? cDouble, double? cDoublePrecision) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlNumericTypesBatchArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }).ToList(); - await QuerySql.InsertMysqlNumericTypesBatch(batchArgs); + await QuerySql.InsertMysqlNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlNumericTypesCntRow { Cnt = batchSize, @@ -727,7 +727,7 @@ public async Task TestFloatingPointCopyFrom(int batchSize, float? cFloat, decima CDouble = cDouble, CDoublePrecision = cDoublePrecision }; - var actual = await QuerySql.GetMysqlNumericTypesCnt(); + var actual = await QuerySql.GetMysqlNumericTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMysqlNumericTypesCntRow y) { @@ -748,7 +748,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMys public async Task TestDateTimeCopyFrom(int batchSize, short? cYear, DateTime? cDate, DateTime? cDatetime, DateTime? cTimestamp, TimeSpan? cTime) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlDatetimeTypesBatchArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime }).ToList(); - await QuerySql.InsertMysqlDatetimeTypesBatch(batchArgs); + await QuerySql.InsertMysqlDatetimeTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlDatetimeTypesCntRow { Cnt = batchSize, @@ -758,7 +758,7 @@ public async Task TestDateTimeCopyFrom(int batchSize, short? cYear, DateTime? cD CTimestamp = cTimestamp, CTime = cTime }; - var actual = await QuerySql.GetMysqlDatetimeTypesCnt(); + var actual = await QuerySql.GetMysqlDatetimeTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesCntRow x, QuerySql.GetMysqlDatetimeTypesCntRow y) { @@ -778,7 +778,7 @@ void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesCntRow x, QuerySql.GetMy public async Task TestBinaryCopyFrom(int batchSize, byte? cBit, byte[] cBinary, byte[] cVarbinary, byte[] cTinyblob, byte[] cBlob, byte[] cMediumblob, byte[] cLongblob) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlBinaryTypesBatchArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }).ToList(); - await QuerySql.InsertMysqlBinaryTypesBatch(batchArgs); + await QuerySql.InsertMysqlBinaryTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlBinaryTypesCntRow { Cnt = batchSize, @@ -790,7 +790,7 @@ public async Task TestBinaryCopyFrom(int batchSize, byte? cBit, byte[] cBinary, CMediumblob = cMediumblob, CLongblob = cLongblob }; - var actual = await QuerySql.GetMysqlBinaryTypesCnt(); + var actual = await QuerySql.GetMysqlBinaryTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlBinaryTypesCntRow x, QuerySql.GetMysqlBinaryTypesCntRow y) { @@ -819,14 +819,14 @@ private static IEnumerable MySqlEnumCopyFromTestCases public async Task TestCopyFrom(int batchSize, MysqlStringTypesCEnum? cEnum, HashSet cSet) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CEnum = cEnum, CSet = cSet }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, CEnum = cEnum, CSet = cSet }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { @@ -845,13 +845,13 @@ public async Task TestJsonCopyFrom(int batchSize, string cJson) if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CJson = cParsedJson }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, CJson = cParsedJson }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { diff --git a/end2end/EndToEndTests/NpgsqlDapperTester.cs b/end2end/EndToEndTests/NpgsqlDapperTester.cs index 6668dea5..67edbbc3 100644 --- a/end2end/EndToEndTests/NpgsqlDapperTester.cs +++ b/end2end/EndToEndTests/NpgsqlDapperTester.cs @@ -13,13 +13,13 @@ public partial class NpgsqlDapperTester [TearDown] public async Task EmptyTestsTable() { - await QuerySql.TruncateAuthors(); - await QuerySql.TruncatePostgresNumericTypes(); - await QuerySql.TruncatePostgresStringTypes(); - await QuerySql.TruncatePostgresDateTimeTypes(); - await QuerySql.TruncatePostgresGeoTypes(); - await QuerySql.TruncatePostgresNetworkTypes(); - await QuerySql.TruncatePostgresArrayTypes(); - await QuerySql.TruncatePostgresSpecialTypes(); + await QuerySql.TruncateAuthorsAsync(); + await QuerySql.TruncatePostgresNumericTypesAsync(); + await QuerySql.TruncatePostgresStringTypesAsync(); + await QuerySql.TruncatePostgresDateTimeTypesAsync(); + await QuerySql.TruncatePostgresGeoTypesAsync(); + await QuerySql.TruncatePostgresNetworkTypesAsync(); + await QuerySql.TruncatePostgresArrayTypesAsync(); + await QuerySql.TruncatePostgresSpecialTypesAsync(); } } \ No newline at end of file diff --git a/end2end/EndToEndTests/NpgsqlDapperTester.generated.cs b/end2end/EndToEndTests/NpgsqlDapperTester.generated.cs index d8fcc7f2..b6e8fd8e 100644 --- a/end2end/EndToEndTests/NpgsqlDapperTester.generated.cs +++ b/end2end/EndToEndTests/NpgsqlDapperTester.generated.cs @@ -18,17 +18,17 @@ namespace EndToEndTests public partial class NpgsqlDapperTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -39,10 +39,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -58,7 +58,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -76,21 +76,21 @@ void AssertSequenceEquals(List x, List { @@ -107,7 +107,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -125,16 +125,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -167,7 +167,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -188,12 +188,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -227,7 +227,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -248,10 +248,10 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -267,7 +267,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -285,10 +285,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -298,7 +298,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -316,14 +316,14 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestPostgresTransaction() + public async Task TestPostgresTransactionAsync() { var connection = new Npgsql.NpgsqlConnection(Environment.GetEnvironmentVariable(EndToEndCommon.PostgresConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); await transaction.CommitAsync(); var expected = new QuerySql.GetAuthorRow @@ -332,7 +332,7 @@ public async Task TestPostgresTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -343,52 +343,52 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestPostgresTransactionRollback() + public async Task TestPostgresTransactionRollbackAsync() { var connection = new Npgsql.NpgsqlConnection(Environment.GetEnvironmentVariable(EndToEndCommon.PostgresConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var sqlQueryWithTx = QuerySql.WithTransaction(transaction); - await sqlQueryWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await sqlQueryWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); await transaction.RollbackAsync(); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } [Test] - public async Task TestArray() + public async Task TestArrayAsync() { - var id1 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); - var bojackId = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthorsByIds(new QuerySql.GetAuthorsByIdsArgs { LongArr1 = new[] { id1, bojackId } }); + var id1 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); + var bojackId = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorsByIdsAsync(new QuerySql.GetAuthorsByIdsArgs { LongArr1 = new[] { id1, bojackId } }); ClassicAssert.AreEqual(2, actual.Count); } [Test] - public async Task TestMultipleArrays() + public async Task TestMultipleArraysAsync() { - var id1 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); - var id2 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Only 2 things are infinite, the universe and human stupidity" }); - var bojackId = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthorsByIdsAndNames(new QuerySql.GetAuthorsByIdsAndNamesArgs { LongArr1 = new[] { id1, bojackId }, StringArr2 = new[] { "Albert Einstein" } }); + var id1 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); + var id2 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Only 2 things are infinite, the universe and human stupidity" }); + var bojackId = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorsByIdsAndNamesAsync(new QuerySql.GetAuthorsByIdsAndNamesArgs { LongArr1 = new[] { id1, bojackId }, StringArr2 = new[] { "Albert Einstein" } }); ClassicAssert.AreEqual(1, actual.Count); } [Test] [TestCase(-54355, "White Light from the Mouth of Infinity", "2022-10-2 15:44:01+09:00")] [TestCase(null, null, "1970-01-01 00:00:00")] - public async Task TestPostgresDataTypesOverride(int? cInteger, string cVarchar, DateTime cTimestamp) + public async Task TestPostgresDataTypesOverrideAsync(int? cInteger, string cVarchar, DateTime cTimestamp) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CInteger = cInteger }); - await QuerySql.InsertPostgresDateTimeTypes(new QuerySql.InsertPostgresDateTimeTypesArgs { CTimestamp = cTimestamp }); - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CVarchar = cVarchar }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CInteger = cInteger }); + await QuerySql.InsertPostgresDateTimeTypesAsync(new QuerySql.InsertPostgresDateTimeTypesArgs { CTimestamp = cTimestamp }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CVarchar = cVarchar }); var expected = new QuerySql.GetPostgresFunctionsRow { MaxInteger = cInteger, MaxVarchar = cVarchar, MaxTimestamp = cTimestamp }; - var actual = await QuerySql.GetPostgresFunctions(); + var actual = await QuerySql.GetPostgresFunctionsAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresFunctionsRow x, QuerySql.GetPostgresFunctionsRow y) { @@ -401,22 +401,22 @@ void AssertSingularEquals(QuerySql.GetPostgresFunctionsRow x, QuerySql.GetPostgr [Test] public void TestPostgresInvalidJson() { - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonpath = "SOME INVALID JSONPATH" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonpath = "SOME INVALID JSONPATH" })); } [Test] public void TestPostgresInvalidXml() { - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CXmlStringOverride = "SOME INVALID XML" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CXmlStringOverride = "SOME INVALID XML" })); } [Test] [TestCase("E", "It takes a nation of millions to hold us back", "Rebel Without a Pause", "Master of Puppets", "Prophets of Rage")] [TestCase(null, null, null, null, null)] - public async Task TestPostgresStringTypes(string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) + public async Task TestPostgresStringTypesAsync(string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) { - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText, }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText, }); var expected = new QuerySql.GetPostgresStringTypesRow { CChar = cChar, @@ -425,7 +425,7 @@ public async Task TestPostgresStringTypes(string cChar, string cVarchar, string CBpchar = cBpchar, CText = cText, }; - var actual = await QuerySql.GetPostgresStringTypes(); + var actual = await QuerySql.GetPostgresStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresStringTypesRow x, QuerySql.GetPostgresStringTypesRow y) { @@ -440,9 +440,9 @@ void AssertSingularEquals(QuerySql.GetPostgresStringTypesRow x, QuerySql.GetPost [Test] [TestCase(true, 35, -23423, 4235235263L)] [TestCase(null, null, null, null)] - public async Task TestPostgresIntegerTypes(bool cBoolean, short cSmallint, int cInteger, long cBigint) + public async Task TestPostgresIntegerTypesAsync(bool cBoolean, short cSmallint, int cInteger, long cBigint) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }); var expected = new QuerySql.GetPostgresNumericTypesRow { CBoolean = cBoolean, @@ -450,7 +450,7 @@ public async Task TestPostgresIntegerTypes(bool cBoolean, short cSmallint, int c CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetPostgresNumericTypes(); + var actual = await QuerySql.GetPostgresNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPostgresNumericTypesRow y) { @@ -464,9 +464,9 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPos [Test] [TestCase(3.83f, 4.5534, 998.432, -8403284.321435, 42332.53)] [TestCase(null, null, null, null, null)] - public async Task TestPostgresFloatingPointTypes(float? cReal, decimal? cNumeric, decimal? cDecimal, double? cDoublePrecision, decimal? cMoney) + public async Task TestPostgresFloatingPointTypesAsync(float? cReal, decimal? cNumeric, decimal? cDecimal, double? cDoublePrecision, decimal? cMoney) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CReal = cReal, CNumeric = cNumeric, CDecimal = cDecimal, CDoublePrecision = cDoublePrecision, CMoney = cMoney }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CReal = cReal, CNumeric = cNumeric, CDecimal = cDecimal, CDoublePrecision = cDoublePrecision, CMoney = cMoney }); var expected = new QuerySql.GetPostgresNumericTypesRow { CReal = cReal, @@ -475,7 +475,7 @@ public async Task TestPostgresFloatingPointTypes(float? cReal, decimal? cNumeric CDoublePrecision = cDoublePrecision, CMoney = cMoney }; - var actual = await QuerySql.GetPostgresNumericTypes(); + var actual = await QuerySql.GetPostgresNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPostgresNumericTypesRow y) { @@ -498,9 +498,9 @@ private static IEnumerable PostgresDateTimeTypesTestCases [Test] [TestCaseSource(nameof(PostgresDateTimeTypesTestCases))] - public async Task TestPostgresDateTimeTypes(DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval, Instant? cTimestampNodaInstantOverride) + public async Task TestPostgresDateTimeTypesAsync(DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval, Instant? cTimestampNodaInstantOverride) { - await QuerySql.InsertPostgresDateTimeTypes(new QuerySql.InsertPostgresDateTimeTypesArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTz, CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); + await QuerySql.InsertPostgresDateTimeTypesAsync(new QuerySql.InsertPostgresDateTimeTypesArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTz, CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); var expected = new QuerySql.GetPostgresDateTimeTypesRow { CDate = cDate, @@ -510,7 +510,7 @@ public async Task TestPostgresDateTimeTypes(DateTime? cDate, TimeSpan? cTime, Da CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }; - var actual = await QuerySql.GetPostgresDateTimeTypes(); + var actual = await QuerySql.GetPostgresDateTimeTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresDateTimeTypesRow x, QuerySql.GetPostgresDateTimeTypesRow y) { @@ -535,9 +535,9 @@ private static IEnumerable PostgresArrayTypesTestCases [Test] [TestCaseSource(nameof(PostgresArrayTypesTestCases))] - public async Task TestPostgresArrayTypes(byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cDateArray, DateTime[] cTimestampArray) + public async Task TestPostgresArrayTypesAsync(byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cDateArray, DateTime[] cTimestampArray) { - await QuerySql.InsertPostgresArrayTypes(new QuerySql.InsertPostgresArrayTypesArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CDateArray = cDateArray, CTimestampArray = cTimestampArray }); + await QuerySql.InsertPostgresArrayTypesAsync(new QuerySql.InsertPostgresArrayTypesArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CDateArray = cDateArray, CTimestampArray = cTimestampArray }); var expected = new QuerySql.GetPostgresArrayTypesRow { CBytea = cBytea, @@ -548,7 +548,7 @@ public async Task TestPostgresArrayTypes(byte[] cBytea, bool[] cBooleanArray, st CDateArray = cDateArray, CTimestampArray = cTimestampArray }; - var actual = await QuerySql.GetPostgresArrayTypes(); + var actual = await QuerySql.GetPostgresArrayTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresArrayTypesRow x, QuerySql.GetPostgresArrayTypesRow y) { @@ -573,14 +573,14 @@ private static IEnumerable PostgresGuidDataTypesTestCases [Test] [TestCaseSource(nameof(PostgresGuidDataTypesTestCases))] - public async Task TestPostgresGuidDataTypes(Guid? cUuid) + public async Task TestPostgresGuidDataTypesAsync(Guid? cUuid) { - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CUuid = cUuid }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CUuid = cUuid }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CUuid = cUuid }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -590,10 +590,10 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [Test] [Obsolete] // due to NpgsqlTsVector.Parse usage - public async Task TestPostgresFullTextSearchDataTypes() + public async Task TestPostgresFullTextSearchDataTypesAsync() { - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CText = "Hello world" }); - var actual = await QuerySql.GetPostgresStringTypesTextSearch(new QuerySql.GetPostgresStringTypesTextSearchArgs { ToTsquery = "Hello" }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CText = "Hello world" }); + var actual = await QuerySql.GetPostgresStringTypesTextSearchAsync(new QuerySql.GetPostgresStringTypesTextSearchArgs { ToTsquery = "Hello" }); var expected = new QuerySql.GetPostgresStringTypesTextSearchRow { CText = "Hello world", @@ -622,9 +622,9 @@ private static IEnumerable PostgresNetworkDataTypesTestCases [Test] [TestCaseSource(nameof(PostgresNetworkDataTypesTestCases))] - public async Task TestPostgresNetworkDataTypes(NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr, string cMacaddr8) + public async Task TestPostgresNetworkDataTypesAsync(NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr, string cMacaddr8) { - await QuerySql.InsertPostgresNetworkTypes(new QuerySql.InsertPostgresNetworkTypesArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }); + await QuerySql.InsertPostgresNetworkTypesAsync(new QuerySql.InsertPostgresNetworkTypesArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }); var expected = new QuerySql.GetPostgresNetworkTypesRow { CCidr = cCidr, @@ -632,7 +632,7 @@ public async Task TestPostgresNetworkDataTypes(NpgsqlCidr? cCidr, IPAddress cIne CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }; - var actual = await QuerySql.GetPostgresNetworkTypes(); + var actual = await QuerySql.GetPostgresNetworkTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNetworkTypesRow x, QuerySql.GetPostgresNetworkTypesRow y) { @@ -654,9 +654,9 @@ private static IEnumerable PostgresGeoTypesTestCases [Test] [TestCaseSource(nameof(PostgresGeoTypesTestCases))] - public async Task TestPostgresGeoTypes(NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) + public async Task TestPostgresGeoTypesAsync(NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) { - await QuerySql.InsertPostgresGeoTypes(new QuerySql.InsertPostgresGeoTypesArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }); + await QuerySql.InsertPostgresGeoTypesAsync(new QuerySql.InsertPostgresGeoTypesArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }); var expected = new QuerySql.GetPostgresGeoTypesRow { CPoint = cPoint, @@ -667,7 +667,7 @@ public async Task TestPostgresGeoTypes(NpgsqlPoint? cPoint, NpgsqlLine? cLine, N CPolygon = cPolygon, CCircle = cCircle }; - var actual = await QuerySql.GetPostgresGeoTypes(); + var actual = await QuerySql.GetPostgresGeoTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgresGeoTypesRow y) { @@ -684,12 +684,12 @@ void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgre [Test] [TestCase("{\"name\": \"Swordfishtrombones\", \"year\" :1983}", "$.\"name\"")] [TestCase(null, null)] - public async Task TestPostgresJsonDataTypes(string cJson, string cJsonpath) + public async Task TestPostgresJsonDataTypesAsync(string cJson, string cJsonpath) { JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJson = cParsedJson, CJsonb = cParsedJson, CJsonStringOverride = cJson, CJsonpath = cJsonpath }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJson = cParsedJson, CJsonb = cParsedJson, CJsonStringOverride = cJson, CJsonpath = cJsonpath }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CJson = cParsedJson, @@ -697,7 +697,7 @@ public async Task TestPostgresJsonDataTypes(string cJson, string cJsonpath) CJsonStringOverride = cJson, CJsonpath = cJsonpath }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -722,7 +722,7 @@ void AssertJsonElementEquals(JsonElement? x, JsonElement? y) [Test] [TestCase("Good morning xml, the world says hello")] [TestCase(null)] - public async Task TestPostgresXmlDataTypes(string cXml) + public async Task TestPostgresXmlDataTypesAsync(string cXml) { XmlDocument parsedXml = null; if (cXml != null) @@ -731,12 +731,12 @@ public async Task TestPostgresXmlDataTypes(string cXml) parsedXml.LoadXml(cXml); } - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CXml = parsedXml }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CXml = parsedXml }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CXml = parsedXml }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -751,14 +751,14 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [TestCase(CEnum.Medium)] [TestCase(CEnum.Big)] [TestCase(null)] - public async Task TestPostgresEnumTypes(CEnum? cEnum) + public async Task TestPostgresEnumTypesAsync(CEnum? cEnum) { - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CEnum = cEnum }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CEnum = cEnum }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CEnum = cEnum }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -768,14 +768,14 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [Test] [TestCase(CEnum.Small)] - public async Task TestPostgresNotNullTypes(CEnum cEnumNotNull) + public async Task TestPostgresNotNullTypesAsync(CEnum cEnumNotNull) { - await QuerySql.InsertPostgresNotNullTypes(new QuerySql.InsertPostgresNotNullTypesArgs { CEnumNotNull = cEnumNotNull }); + await QuerySql.InsertPostgresNotNullTypesAsync(new QuerySql.InsertPostgresNotNullTypesArgs { CEnumNotNull = cEnumNotNull }); var expected = new QuerySql.GetPostgresNotNullTypesRow { CEnumNotNull = cEnumNotNull }; - var actual = await QuerySql.GetPostgresNotNullTypes(); + var actual = await QuerySql.GetPostgresNotNullTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNotNullTypesRow x, QuerySql.GetPostgresNotNullTypesRow y) { @@ -786,10 +786,10 @@ void AssertSingularEquals(QuerySql.GetPostgresNotNullTypesRow x, QuerySql.GetPos [Test] [TestCase(100, "z", "Sex Pistols", "Anarchy in the U.K", "Yoshimi Battles the Pink Robots", "Never Mind the Bollocks...")] [TestCase(10, null, null, null, null, null)] - public async Task TestStringCopyFrom(int batchSize, string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) + public async Task TestStringCopyFromAsync(int batchSize, string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresStringTypesBatchArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText }).ToList(); - await QuerySql.InsertPostgresStringTypesBatch(batchArgs); + await QuerySql.InsertPostgresStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresStringTypesCntRow { Cnt = batchSize, @@ -799,7 +799,7 @@ public async Task TestStringCopyFrom(int batchSize, string cChar, string cVarcha CBpchar = cBpchar, CText = cText }; - var actual = await QuerySql.GetPostgresStringTypesCnt(); + var actual = await QuerySql.GetPostgresStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresStringTypesCntRow x, QuerySql.GetPostgresStringTypesCntRow y) { @@ -815,10 +815,10 @@ void AssertSingularEquals(QuerySql.GetPostgresStringTypesCntRow x, QuerySql.GetP [Test] [TestCase(100, true, 3, 453, -1445214231L)] [TestCase(10, null, null, null, null)] - public async Task TestIntegerCopyFrom(int batchSize, bool? cBoolean, short? cSmallint, int? cInteger, long? cBigint) + public async Task TestIntegerCopyFromAsync(int batchSize, bool? cBoolean, short? cSmallint, int? cInteger, long? cBigint) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNumericTypesBatchArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }).ToList(); - await QuerySql.InsertPostgresNumericTypesBatch(batchArgs); + await QuerySql.InsertPostgresNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNumericTypesCntRow { Cnt = batchSize, @@ -827,7 +827,7 @@ public async Task TestIntegerCopyFrom(int batchSize, bool? cBoolean, short? cSma CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetPostgresNumericTypesCnt(); + var actual = await QuerySql.GetPostgresNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.GetPostgresNumericTypesCntRow y) { @@ -842,10 +842,10 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.Get [Test] [TestCase(100, 666.6f, 336.3431, -99.999, -1377.996, -43242.43)] [TestCase(10, null, null, null, null, null)] - public async Task TestFloatingPointCopyFrom(int batchSize, float? cReal, decimal? cDecimal, decimal? cNumeric, double? cDoublePrecision, decimal? cMoney) + public async Task TestFloatingPointCopyFromAsync(int batchSize, float? cReal, decimal? cDecimal, decimal? cNumeric, double? cDoublePrecision, decimal? cMoney) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNumericTypesBatchArgs { CReal = cReal, CDecimal = cDecimal, CNumeric = cNumeric, CDoublePrecision = cDoublePrecision, CMoney = cMoney }).ToList(); - await QuerySql.InsertPostgresNumericTypesBatch(batchArgs); + await QuerySql.InsertPostgresNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNumericTypesCntRow { Cnt = batchSize, @@ -855,7 +855,7 @@ public async Task TestFloatingPointCopyFrom(int batchSize, float? cReal, decimal CDoublePrecision = cDoublePrecision, CMoney = cMoney }; - var actual = await QuerySql.GetPostgresNumericTypesCnt(); + var actual = await QuerySql.GetPostgresNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.GetPostgresNumericTypesCntRow y) { @@ -871,13 +871,13 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.Get [Test] [TestCase(100, "1973-12-3", "00:34:00", "1960-11-3 02:01:22", "2030-07-20 15:44:01+09:00", "02:03:04")] [TestCase(10, null, null, null, null, null)] - public async Task TestDateTimeCopyFrom(int batchSize, DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval) + public async Task TestDateTimeCopyFromAsync(int batchSize, DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval) { DateTime? cTimestampWithTzAsUtc = null; if (cTimestampWithTz != null) cTimestampWithTzAsUtc = DateTime.SpecifyKind(cTimestampWithTz.Value, DateTimeKind.Utc); var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresDateTimeTypesBatchArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTzAsUtc, CInterval = cInterval }).ToList(); - await QuerySql.InsertPostgresDateTimeTypesBatch(batchArgs); + await QuerySql.InsertPostgresDateTimeTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresDateTimeTypesCntRow { Cnt = batchSize, @@ -887,7 +887,7 @@ public async Task TestDateTimeCopyFrom(int batchSize, DateTime? cDate, TimeSpan? CTimestampWithTz = cTimestampWithTz, CInterval = cInterval }; - var actual = await QuerySql.GetPostgresDateTimeTypesCnt(); + var actual = await QuerySql.GetPostgresDateTimeTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresDateTimeTypesCntRow x, QuerySql.GetPostgresDateTimeTypesCntRow y) { @@ -911,16 +911,16 @@ private static IEnumerable PostgresGuidCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresGuidCopyFromTestCases))] - public async Task TestPostgresGuidCopyFrom(int batchSize, Guid? cUuid) + public async Task TestPostgresGuidCopyFromAsync(int batchSize, Guid? cUuid) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresSpecialTypesBatchArgs { CUuid = cUuid }).ToList(); - await QuerySql.InsertPostgresSpecialTypesBatch(batchArgs); + await QuerySql.InsertPostgresSpecialTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresSpecialTypesCntRow { Cnt = batchSize, CUuid = cUuid }; - var actual = await QuerySql.GetPostgresSpecialTypesCnt(); + var actual = await QuerySql.GetPostgresSpecialTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.GetPostgresSpecialTypesCntRow y) { @@ -932,20 +932,20 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.Get [Test] [TestCase(100, "{\"song\": \"Pinball Wizard\", \"album\": \"Tommy\", \"artist\": \"The Who\"}")] [TestCase(10, null)] - public async Task TestPostgresJsonCopyFrom(int batchSize, string cJson) + public async Task TestPostgresJsonCopyFromAsync(int batchSize, string cJson) { JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresSpecialTypesBatchArgs { CJson = cParsedJson, CJsonb = cParsedJson }).ToList(); - await QuerySql.InsertPostgresSpecialTypesBatch(batchArgs); + await QuerySql.InsertPostgresSpecialTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresSpecialTypesCntRow { Cnt = batchSize, CJson = cParsedJson, CJsonb = cParsedJson }; - var actual = await QuerySql.GetPostgresSpecialTypesCnt(); + var actual = await QuerySql.GetPostgresSpecialTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.GetPostgresSpecialTypesCntRow y) { @@ -977,10 +977,10 @@ private static IEnumerable PostgresNetworkCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresNetworkCopyFromTestCases))] - public async Task TestPostgresNetworkCopyFrom(int batchSize, NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr) + public async Task TestPostgresNetworkCopyFromAsync(int batchSize, NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNetworkTypesBatchArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr }).ToList(); - await QuerySql.InsertPostgresNetworkTypesBatch(batchArgs); + await QuerySql.InsertPostgresNetworkTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNetworkTypesCntRow { Cnt = batchSize, @@ -988,7 +988,7 @@ public async Task TestPostgresNetworkCopyFrom(int batchSize, NpgsqlCidr? cCidr, CInet = cInet, CMacaddr = cMacaddr }; - var actual = await QuerySql.GetPostgresNetworkTypesCnt(); + var actual = await QuerySql.GetPostgresNetworkTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNetworkTypesCntRow x, QuerySql.GetPostgresNetworkTypesCntRow y) { @@ -1011,10 +1011,10 @@ private static IEnumerable PostgresArrayCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresArrayCopyFromTestCases))] - public async Task TestArrayCopyFrom(int batchSize, byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cTimestampArray) + public async Task TestArrayCopyFromAsync(int batchSize, byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cTimestampArray) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresArrayTypesBatchArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CTimestampArray = cTimestampArray }).ToList(); - await QuerySql.InsertPostgresArrayTypesBatch(batchArgs); + await QuerySql.InsertPostgresArrayTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresArrayTypesCntRow { Cnt = batchSize, @@ -1025,7 +1025,7 @@ public async Task TestArrayCopyFrom(int batchSize, byte[] cBytea, bool[] cBoolea CDecimalArray = cDecimalArray, CTimestampArray = cTimestampArray }; - var actual = await QuerySql.GetPostgresArrayTypesCnt(); + var actual = await QuerySql.GetPostgresArrayTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresArrayTypesCntRow x, QuerySql.GetPostgresArrayTypesCntRow y) { @@ -1050,10 +1050,10 @@ private static IEnumerable PostgresGeoCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresGeoCopyFromTestCases))] - public async Task TestPostgresGeoCopyFrom(int batchSize, NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) + public async Task TestPostgresGeoCopyFromAsync(int batchSize, NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresGeoTypesBatchArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }).ToList(); - await QuerySql.InsertPostgresGeoTypesBatch(batchArgs); + await QuerySql.InsertPostgresGeoTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresGeoTypesRow { CPoint = cPoint, @@ -1064,7 +1064,7 @@ public async Task TestPostgresGeoCopyFrom(int batchSize, NpgsqlPoint? cPoint, Np CPolygon = cPolygon, CCircle = cCircle }; - var actual = await QuerySql.GetPostgresGeoTypes(); + var actual = await QuerySql.GetPostgresGeoTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgresGeoTypesRow y) { diff --git a/end2end/EndToEndTests/NpgsqlTester.cs b/end2end/EndToEndTests/NpgsqlTester.cs index 25c73241..e497f265 100644 --- a/end2end/EndToEndTests/NpgsqlTester.cs +++ b/end2end/EndToEndTests/NpgsqlTester.cs @@ -13,14 +13,14 @@ public partial class NpgsqlTester [TearDown] public async Task EmptyTestsTables() { - await QuerySql.TruncateAuthors(); - await QuerySql.TruncatePostgresNumericTypes(); - await QuerySql.TruncatePostgresStringTypes(); - await QuerySql.TruncatePostgresDateTimeTypes(); - await QuerySql.TruncatePostgresGeoTypes(); - await QuerySql.TruncatePostgresNetworkTypes(); - await QuerySql.TruncatePostgresArrayTypes(); - await QuerySql.TruncatePostgresSpecialTypes(); - await QuerySql.TruncatePostgresNotNullTypes(); + await QuerySql.TruncateAuthorsAsync(); + await QuerySql.TruncatePostgresNumericTypesAsync(); + await QuerySql.TruncatePostgresStringTypesAsync(); + await QuerySql.TruncatePostgresDateTimeTypesAsync(); + await QuerySql.TruncatePostgresGeoTypesAsync(); + await QuerySql.TruncatePostgresNetworkTypesAsync(); + await QuerySql.TruncatePostgresArrayTypesAsync(); + await QuerySql.TruncatePostgresSpecialTypesAsync(); + await QuerySql.TruncatePostgresNotNullTypesAsync(); } } \ No newline at end of file diff --git a/end2end/EndToEndTests/NpgsqlTester.generated.cs b/end2end/EndToEndTests/NpgsqlTester.generated.cs index d2f7e9b8..7049931f 100644 --- a/end2end/EndToEndTests/NpgsqlTester.generated.cs +++ b/end2end/EndToEndTests/NpgsqlTester.generated.cs @@ -18,17 +18,17 @@ namespace EndToEndTests public partial class NpgsqlTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -39,10 +39,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -58,7 +58,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -76,21 +76,21 @@ void AssertSequenceEquals(List x, List { @@ -107,7 +107,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -125,16 +125,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -167,7 +167,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -188,12 +188,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -227,7 +227,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -248,10 +248,10 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -267,7 +267,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -285,10 +285,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -298,7 +298,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -316,14 +316,14 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestPostgresTransaction() + public async Task TestPostgresTransactionAsync() { var connection = new Npgsql.NpgsqlConnection(Environment.GetEnvironmentVariable(EndToEndCommon.PostgresConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); await transaction.CommitAsync(); var expected = new QuerySql.GetAuthorRow @@ -332,7 +332,7 @@ public async Task TestPostgresTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -343,52 +343,52 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestPostgresTransactionRollback() + public async Task TestPostgresTransactionRollbackAsync() { var connection = new Npgsql.NpgsqlConnection(Environment.GetEnvironmentVariable(EndToEndCommon.PostgresConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var sqlQueryWithTx = QuerySql.WithTransaction(transaction); - await sqlQueryWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await sqlQueryWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); await transaction.RollbackAsync(); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } [Test] - public async Task TestArray() + public async Task TestArrayAsync() { - var id1 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); - var bojackId = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthorsByIds(new QuerySql.GetAuthorsByIdsArgs { LongArr1 = new[] { id1, bojackId } }); + var id1 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); + var bojackId = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorsByIdsAsync(new QuerySql.GetAuthorsByIdsArgs { LongArr1 = new[] { id1, bojackId } }); ClassicAssert.AreEqual(2, actual.Count); } [Test] - public async Task TestMultipleArrays() + public async Task TestMultipleArraysAsync() { - var id1 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); - var id2 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Only 2 things are infinite, the universe and human stupidity" }); - var bojackId = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthorsByIdsAndNames(new QuerySql.GetAuthorsByIdsAndNamesArgs { LongArr1 = new[] { id1, bojackId }, StringArr2 = new[] { "Albert Einstein" } }); + var id1 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); + var id2 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Only 2 things are infinite, the universe and human stupidity" }); + var bojackId = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorsByIdsAndNamesAsync(new QuerySql.GetAuthorsByIdsAndNamesArgs { LongArr1 = new[] { id1, bojackId }, StringArr2 = new[] { "Albert Einstein" } }); ClassicAssert.AreEqual(1, actual.Count); } [Test] [TestCase(-54355, "White Light from the Mouth of Infinity", "2022-10-2 15:44:01+09:00")] [TestCase(null, null, "1970-01-01 00:00:00")] - public async Task TestPostgresDataTypesOverride(int? cInteger, string cVarchar, DateTime cTimestamp) + public async Task TestPostgresDataTypesOverrideAsync(int? cInteger, string cVarchar, DateTime cTimestamp) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CInteger = cInteger }); - await QuerySql.InsertPostgresDateTimeTypes(new QuerySql.InsertPostgresDateTimeTypesArgs { CTimestamp = cTimestamp }); - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CVarchar = cVarchar }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CInteger = cInteger }); + await QuerySql.InsertPostgresDateTimeTypesAsync(new QuerySql.InsertPostgresDateTimeTypesArgs { CTimestamp = cTimestamp }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CVarchar = cVarchar }); var expected = new QuerySql.GetPostgresFunctionsRow { MaxInteger = cInteger, MaxVarchar = cVarchar, MaxTimestamp = cTimestamp }; - var actual = await QuerySql.GetPostgresFunctions(); + var actual = await QuerySql.GetPostgresFunctionsAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresFunctionsRow x, QuerySql.GetPostgresFunctionsRow y) { @@ -401,22 +401,22 @@ void AssertSingularEquals(QuerySql.GetPostgresFunctionsRow x, QuerySql.GetPostgr [Test] public void TestPostgresInvalidJson() { - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonpath = "SOME INVALID JSONPATH" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonpath = "SOME INVALID JSONPATH" })); } [Test] public void TestPostgresInvalidXml() { - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CXmlStringOverride = "SOME INVALID XML" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CXmlStringOverride = "SOME INVALID XML" })); } [Test] [TestCase("E", "It takes a nation of millions to hold us back", "Rebel Without a Pause", "Master of Puppets", "Prophets of Rage")] [TestCase(null, null, null, null, null)] - public async Task TestPostgresStringTypes(string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) + public async Task TestPostgresStringTypesAsync(string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) { - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText, }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText, }); var expected = new QuerySql.GetPostgresStringTypesRow { CChar = cChar, @@ -425,7 +425,7 @@ public async Task TestPostgresStringTypes(string cChar, string cVarchar, string CBpchar = cBpchar, CText = cText, }; - var actual = await QuerySql.GetPostgresStringTypes(); + var actual = await QuerySql.GetPostgresStringTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresStringTypesRow x, QuerySql.GetPostgresStringTypesRow y) { @@ -440,9 +440,9 @@ void AssertSingularEquals(QuerySql.GetPostgresStringTypesRow x, QuerySql.GetPost [Test] [TestCase(true, 35, -23423, 4235235263L)] [TestCase(null, null, null, null)] - public async Task TestPostgresIntegerTypes(bool cBoolean, short cSmallint, int cInteger, long cBigint) + public async Task TestPostgresIntegerTypesAsync(bool cBoolean, short cSmallint, int cInteger, long cBigint) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }); var expected = new QuerySql.GetPostgresNumericTypesRow { CBoolean = cBoolean, @@ -450,7 +450,7 @@ public async Task TestPostgresIntegerTypes(bool cBoolean, short cSmallint, int c CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetPostgresNumericTypes(); + var actual = await QuerySql.GetPostgresNumericTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPostgresNumericTypesRow y) { @@ -464,9 +464,9 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPos [Test] [TestCase(3.83f, 4.5534, 998.432, -8403284.321435, 42332.53)] [TestCase(null, null, null, null, null)] - public async Task TestPostgresFloatingPointTypes(float? cReal, decimal? cNumeric, decimal? cDecimal, double? cDoublePrecision, decimal? cMoney) + public async Task TestPostgresFloatingPointTypesAsync(float? cReal, decimal? cNumeric, decimal? cDecimal, double? cDoublePrecision, decimal? cMoney) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CReal = cReal, CNumeric = cNumeric, CDecimal = cDecimal, CDoublePrecision = cDoublePrecision, CMoney = cMoney }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CReal = cReal, CNumeric = cNumeric, CDecimal = cDecimal, CDoublePrecision = cDoublePrecision, CMoney = cMoney }); var expected = new QuerySql.GetPostgresNumericTypesRow { CReal = cReal, @@ -475,7 +475,7 @@ public async Task TestPostgresFloatingPointTypes(float? cReal, decimal? cNumeric CDoublePrecision = cDoublePrecision, CMoney = cMoney }; - var actual = await QuerySql.GetPostgresNumericTypes(); + var actual = await QuerySql.GetPostgresNumericTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPostgresNumericTypesRow y) { @@ -498,9 +498,9 @@ private static IEnumerable PostgresDateTimeTypesTestCases [Test] [TestCaseSource(nameof(PostgresDateTimeTypesTestCases))] - public async Task TestPostgresDateTimeTypes(DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval, Instant? cTimestampNodaInstantOverride) + public async Task TestPostgresDateTimeTypesAsync(DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval, Instant? cTimestampNodaInstantOverride) { - await QuerySql.InsertPostgresDateTimeTypes(new QuerySql.InsertPostgresDateTimeTypesArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTz, CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); + await QuerySql.InsertPostgresDateTimeTypesAsync(new QuerySql.InsertPostgresDateTimeTypesArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTz, CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); var expected = new QuerySql.GetPostgresDateTimeTypesRow { CDate = cDate, @@ -510,7 +510,7 @@ public async Task TestPostgresDateTimeTypes(DateTime? cDate, TimeSpan? cTime, Da CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }; - var actual = await QuerySql.GetPostgresDateTimeTypes(); + var actual = await QuerySql.GetPostgresDateTimeTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresDateTimeTypesRow x, QuerySql.GetPostgresDateTimeTypesRow y) { @@ -535,9 +535,9 @@ private static IEnumerable PostgresArrayTypesTestCases [Test] [TestCaseSource(nameof(PostgresArrayTypesTestCases))] - public async Task TestPostgresArrayTypes(byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cDateArray, DateTime[] cTimestampArray) + public async Task TestPostgresArrayTypesAsync(byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cDateArray, DateTime[] cTimestampArray) { - await QuerySql.InsertPostgresArrayTypes(new QuerySql.InsertPostgresArrayTypesArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CDateArray = cDateArray, CTimestampArray = cTimestampArray }); + await QuerySql.InsertPostgresArrayTypesAsync(new QuerySql.InsertPostgresArrayTypesArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CDateArray = cDateArray, CTimestampArray = cTimestampArray }); var expected = new QuerySql.GetPostgresArrayTypesRow { CBytea = cBytea, @@ -548,7 +548,7 @@ public async Task TestPostgresArrayTypes(byte[] cBytea, bool[] cBooleanArray, st CDateArray = cDateArray, CTimestampArray = cTimestampArray }; - var actual = await QuerySql.GetPostgresArrayTypes(); + var actual = await QuerySql.GetPostgresArrayTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresArrayTypesRow x, QuerySql.GetPostgresArrayTypesRow y) { @@ -573,14 +573,14 @@ private static IEnumerable PostgresGuidDataTypesTestCases [Test] [TestCaseSource(nameof(PostgresGuidDataTypesTestCases))] - public async Task TestPostgresGuidDataTypes(Guid? cUuid) + public async Task TestPostgresGuidDataTypesAsync(Guid? cUuid) { - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CUuid = cUuid }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CUuid = cUuid }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CUuid = cUuid }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -590,10 +590,10 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [Test] [Obsolete] // due to NpgsqlTsVector.Parse usage - public async Task TestPostgresFullTextSearchDataTypes() + public async Task TestPostgresFullTextSearchDataTypesAsync() { - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CText = "Hello world" }); - var actual = await QuerySql.GetPostgresStringTypesTextSearch(new QuerySql.GetPostgresStringTypesTextSearchArgs { ToTsquery = "Hello" }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CText = "Hello world" }); + var actual = await QuerySql.GetPostgresStringTypesTextSearchAsync(new QuerySql.GetPostgresStringTypesTextSearchArgs { ToTsquery = "Hello" }); var expected = new QuerySql.GetPostgresStringTypesTextSearchRow { CText = "Hello world", @@ -622,9 +622,9 @@ private static IEnumerable PostgresNetworkDataTypesTestCases [Test] [TestCaseSource(nameof(PostgresNetworkDataTypesTestCases))] - public async Task TestPostgresNetworkDataTypes(NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr, string cMacaddr8) + public async Task TestPostgresNetworkDataTypesAsync(NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr, string cMacaddr8) { - await QuerySql.InsertPostgresNetworkTypes(new QuerySql.InsertPostgresNetworkTypesArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }); + await QuerySql.InsertPostgresNetworkTypesAsync(new QuerySql.InsertPostgresNetworkTypesArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }); var expected = new QuerySql.GetPostgresNetworkTypesRow { CCidr = cCidr, @@ -632,7 +632,7 @@ public async Task TestPostgresNetworkDataTypes(NpgsqlCidr? cCidr, IPAddress cIne CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }; - var actual = await QuerySql.GetPostgresNetworkTypes(); + var actual = await QuerySql.GetPostgresNetworkTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresNetworkTypesRow x, QuerySql.GetPostgresNetworkTypesRow y) { @@ -654,9 +654,9 @@ private static IEnumerable PostgresGeoTypesTestCases [Test] [TestCaseSource(nameof(PostgresGeoTypesTestCases))] - public async Task TestPostgresGeoTypes(NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) + public async Task TestPostgresGeoTypesAsync(NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) { - await QuerySql.InsertPostgresGeoTypes(new QuerySql.InsertPostgresGeoTypesArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }); + await QuerySql.InsertPostgresGeoTypesAsync(new QuerySql.InsertPostgresGeoTypesArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }); var expected = new QuerySql.GetPostgresGeoTypesRow { CPoint = cPoint, @@ -667,7 +667,7 @@ public async Task TestPostgresGeoTypes(NpgsqlPoint? cPoint, NpgsqlLine? cLine, N CPolygon = cPolygon, CCircle = cCircle }; - var actual = await QuerySql.GetPostgresGeoTypes(); + var actual = await QuerySql.GetPostgresGeoTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgresGeoTypesRow y) { @@ -684,12 +684,12 @@ void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgre [Test] [TestCase("{\"name\": \"Swordfishtrombones\", \"year\" :1983}", "$.\"name\"")] [TestCase(null, null)] - public async Task TestPostgresJsonDataTypes(string cJson, string cJsonpath) + public async Task TestPostgresJsonDataTypesAsync(string cJson, string cJsonpath) { JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJson = cParsedJson, CJsonb = cParsedJson, CJsonStringOverride = cJson, CJsonpath = cJsonpath }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJson = cParsedJson, CJsonb = cParsedJson, CJsonStringOverride = cJson, CJsonpath = cJsonpath }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CJson = cParsedJson, @@ -697,7 +697,7 @@ public async Task TestPostgresJsonDataTypes(string cJson, string cJsonpath) CJsonStringOverride = cJson, CJsonpath = cJsonpath }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -722,7 +722,7 @@ void AssertJsonElementEquals(JsonElement? x, JsonElement? y) [Test] [TestCase("Good morning xml, the world says hello")] [TestCase(null)] - public async Task TestPostgresXmlDataTypes(string cXml) + public async Task TestPostgresXmlDataTypesAsync(string cXml) { XmlDocument parsedXml = null; if (cXml != null) @@ -731,12 +731,12 @@ public async Task TestPostgresXmlDataTypes(string cXml) parsedXml.LoadXml(cXml); } - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CXml = parsedXml }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CXml = parsedXml }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CXml = parsedXml }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -751,14 +751,14 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [TestCase(CEnum.Medium)] [TestCase(CEnum.Big)] [TestCase(null)] - public async Task TestPostgresEnumTypes(CEnum? cEnum) + public async Task TestPostgresEnumTypesAsync(CEnum? cEnum) { - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CEnum = cEnum }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CEnum = cEnum }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CEnum = cEnum }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -768,14 +768,14 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [Test] [TestCase(CEnum.Small)] - public async Task TestPostgresNotNullTypes(CEnum cEnumNotNull) + public async Task TestPostgresNotNullTypesAsync(CEnum cEnumNotNull) { - await QuerySql.InsertPostgresNotNullTypes(new QuerySql.InsertPostgresNotNullTypesArgs { CEnumNotNull = cEnumNotNull }); + await QuerySql.InsertPostgresNotNullTypesAsync(new QuerySql.InsertPostgresNotNullTypesArgs { CEnumNotNull = cEnumNotNull }); var expected = new QuerySql.GetPostgresNotNullTypesRow { CEnumNotNull = cEnumNotNull }; - var actual = await QuerySql.GetPostgresNotNullTypes(); + var actual = await QuerySql.GetPostgresNotNullTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresNotNullTypesRow x, QuerySql.GetPostgresNotNullTypesRow y) { @@ -786,10 +786,10 @@ void AssertSingularEquals(QuerySql.GetPostgresNotNullTypesRow x, QuerySql.GetPos [Test] [TestCase(100, "z", "Sex Pistols", "Anarchy in the U.K", "Yoshimi Battles the Pink Robots", "Never Mind the Bollocks...")] [TestCase(10, null, null, null, null, null)] - public async Task TestStringCopyFrom(int batchSize, string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) + public async Task TestStringCopyFromAsync(int batchSize, string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresStringTypesBatchArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText }).ToList(); - await QuerySql.InsertPostgresStringTypesBatch(batchArgs); + await QuerySql.InsertPostgresStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresStringTypesCntRow { Cnt = batchSize, @@ -799,7 +799,7 @@ public async Task TestStringCopyFrom(int batchSize, string cChar, string cVarcha CBpchar = cBpchar, CText = cText }; - var actual = await QuerySql.GetPostgresStringTypesCnt(); + var actual = await QuerySql.GetPostgresStringTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresStringTypesCntRow x, QuerySql.GetPostgresStringTypesCntRow y) { @@ -815,10 +815,10 @@ void AssertSingularEquals(QuerySql.GetPostgresStringTypesCntRow x, QuerySql.GetP [Test] [TestCase(100, true, 3, 453, -1445214231L)] [TestCase(10, null, null, null, null)] - public async Task TestIntegerCopyFrom(int batchSize, bool? cBoolean, short? cSmallint, int? cInteger, long? cBigint) + public async Task TestIntegerCopyFromAsync(int batchSize, bool? cBoolean, short? cSmallint, int? cInteger, long? cBigint) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNumericTypesBatchArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }).ToList(); - await QuerySql.InsertPostgresNumericTypesBatch(batchArgs); + await QuerySql.InsertPostgresNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNumericTypesCntRow { Cnt = batchSize, @@ -827,7 +827,7 @@ public async Task TestIntegerCopyFrom(int batchSize, bool? cBoolean, short? cSma CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetPostgresNumericTypesCnt(); + var actual = await QuerySql.GetPostgresNumericTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.GetPostgresNumericTypesCntRow y) { @@ -842,10 +842,10 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.Get [Test] [TestCase(100, 666.6f, 336.3431, -99.999, -1377.996, -43242.43)] [TestCase(10, null, null, null, null, null)] - public async Task TestFloatingPointCopyFrom(int batchSize, float? cReal, decimal? cDecimal, decimal? cNumeric, double? cDoublePrecision, decimal? cMoney) + public async Task TestFloatingPointCopyFromAsync(int batchSize, float? cReal, decimal? cDecimal, decimal? cNumeric, double? cDoublePrecision, decimal? cMoney) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNumericTypesBatchArgs { CReal = cReal, CDecimal = cDecimal, CNumeric = cNumeric, CDoublePrecision = cDoublePrecision, CMoney = cMoney }).ToList(); - await QuerySql.InsertPostgresNumericTypesBatch(batchArgs); + await QuerySql.InsertPostgresNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNumericTypesCntRow { Cnt = batchSize, @@ -855,7 +855,7 @@ public async Task TestFloatingPointCopyFrom(int batchSize, float? cReal, decimal CDoublePrecision = cDoublePrecision, CMoney = cMoney }; - var actual = await QuerySql.GetPostgresNumericTypesCnt(); + var actual = await QuerySql.GetPostgresNumericTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.GetPostgresNumericTypesCntRow y) { @@ -871,13 +871,13 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.Get [Test] [TestCase(100, "1973-12-3", "00:34:00", "1960-11-3 02:01:22", "2030-07-20 15:44:01+09:00", "02:03:04")] [TestCase(10, null, null, null, null, null)] - public async Task TestDateTimeCopyFrom(int batchSize, DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval) + public async Task TestDateTimeCopyFromAsync(int batchSize, DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval) { DateTime? cTimestampWithTzAsUtc = null; if (cTimestampWithTz != null) cTimestampWithTzAsUtc = DateTime.SpecifyKind(cTimestampWithTz.Value, DateTimeKind.Utc); var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresDateTimeTypesBatchArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTzAsUtc, CInterval = cInterval }).ToList(); - await QuerySql.InsertPostgresDateTimeTypesBatch(batchArgs); + await QuerySql.InsertPostgresDateTimeTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresDateTimeTypesCntRow { Cnt = batchSize, @@ -887,7 +887,7 @@ public async Task TestDateTimeCopyFrom(int batchSize, DateTime? cDate, TimeSpan? CTimestampWithTz = cTimestampWithTz, CInterval = cInterval }; - var actual = await QuerySql.GetPostgresDateTimeTypesCnt(); + var actual = await QuerySql.GetPostgresDateTimeTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresDateTimeTypesCntRow x, QuerySql.GetPostgresDateTimeTypesCntRow y) { @@ -911,16 +911,16 @@ private static IEnumerable PostgresGuidCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresGuidCopyFromTestCases))] - public async Task TestPostgresGuidCopyFrom(int batchSize, Guid? cUuid) + public async Task TestPostgresGuidCopyFromAsync(int batchSize, Guid? cUuid) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresSpecialTypesBatchArgs { CUuid = cUuid }).ToList(); - await QuerySql.InsertPostgresSpecialTypesBatch(batchArgs); + await QuerySql.InsertPostgresSpecialTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresSpecialTypesCntRow { Cnt = batchSize, CUuid = cUuid }; - var actual = await QuerySql.GetPostgresSpecialTypesCnt(); + var actual = await QuerySql.GetPostgresSpecialTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.GetPostgresSpecialTypesCntRow y) { @@ -932,20 +932,20 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.Get [Test] [TestCase(100, "{\"song\": \"Pinball Wizard\", \"album\": \"Tommy\", \"artist\": \"The Who\"}")] [TestCase(10, null)] - public async Task TestPostgresJsonCopyFrom(int batchSize, string cJson) + public async Task TestPostgresJsonCopyFromAsync(int batchSize, string cJson) { JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresSpecialTypesBatchArgs { CJson = cParsedJson, CJsonb = cParsedJson }).ToList(); - await QuerySql.InsertPostgresSpecialTypesBatch(batchArgs); + await QuerySql.InsertPostgresSpecialTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresSpecialTypesCntRow { Cnt = batchSize, CJson = cParsedJson, CJsonb = cParsedJson }; - var actual = await QuerySql.GetPostgresSpecialTypesCnt(); + var actual = await QuerySql.GetPostgresSpecialTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.GetPostgresSpecialTypesCntRow y) { @@ -977,10 +977,10 @@ private static IEnumerable PostgresNetworkCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresNetworkCopyFromTestCases))] - public async Task TestPostgresNetworkCopyFrom(int batchSize, NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr) + public async Task TestPostgresNetworkCopyFromAsync(int batchSize, NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNetworkTypesBatchArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr }).ToList(); - await QuerySql.InsertPostgresNetworkTypesBatch(batchArgs); + await QuerySql.InsertPostgresNetworkTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNetworkTypesCntRow { Cnt = batchSize, @@ -988,7 +988,7 @@ public async Task TestPostgresNetworkCopyFrom(int batchSize, NpgsqlCidr? cCidr, CInet = cInet, CMacaddr = cMacaddr }; - var actual = await QuerySql.GetPostgresNetworkTypesCnt(); + var actual = await QuerySql.GetPostgresNetworkTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresNetworkTypesCntRow x, QuerySql.GetPostgresNetworkTypesCntRow y) { @@ -1011,10 +1011,10 @@ private static IEnumerable PostgresArrayCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresArrayCopyFromTestCases))] - public async Task TestArrayCopyFrom(int batchSize, byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cTimestampArray) + public async Task TestArrayCopyFromAsync(int batchSize, byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cTimestampArray) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresArrayTypesBatchArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CTimestampArray = cTimestampArray }).ToList(); - await QuerySql.InsertPostgresArrayTypesBatch(batchArgs); + await QuerySql.InsertPostgresArrayTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresArrayTypesCntRow { Cnt = batchSize, @@ -1025,7 +1025,7 @@ public async Task TestArrayCopyFrom(int batchSize, byte[] cBytea, bool[] cBoolea CDecimalArray = cDecimalArray, CTimestampArray = cTimestampArray }; - var actual = await QuerySql.GetPostgresArrayTypesCnt(); + var actual = await QuerySql.GetPostgresArrayTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresArrayTypesCntRow x, QuerySql.GetPostgresArrayTypesCntRow y) { @@ -1050,10 +1050,10 @@ private static IEnumerable PostgresGeoCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresGeoCopyFromTestCases))] - public async Task TestPostgresGeoCopyFrom(int batchSize, NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) + public async Task TestPostgresGeoCopyFromAsync(int batchSize, NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresGeoTypesBatchArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }).ToList(); - await QuerySql.InsertPostgresGeoTypesBatch(batchArgs); + await QuerySql.InsertPostgresGeoTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresGeoTypesRow { CPoint = cPoint, @@ -1064,7 +1064,7 @@ public async Task TestPostgresGeoCopyFrom(int batchSize, NpgsqlPoint? cPoint, Np CPolygon = cPolygon, CCircle = cCircle }; - var actual = await QuerySql.GetPostgresGeoTypes(); + var actual = await QuerySql.GetPostgresGeoTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgresGeoTypesRow y) { diff --git a/end2end/EndToEndTests/SqliteDapperTester.cs b/end2end/EndToEndTests/SqliteDapperTester.cs index e74d6678..cae4498e 100644 --- a/end2end/EndToEndTests/SqliteDapperTester.cs +++ b/end2end/EndToEndTests/SqliteDapperTester.cs @@ -13,7 +13,7 @@ public partial class SqliteDapperTester [TearDown] public async Task EmptyTestsTable() { - await QuerySql.DeleteAllAuthors(); - await QuerySql.DeleteAllSqliteTypes(); + await QuerySql.DeleteAllAuthorsAsync(); + await QuerySql.DeleteAllSqliteTypesAsync(); } } \ No newline at end of file diff --git a/end2end/EndToEndTests/SqliteDapperTester.generated.cs b/end2end/EndToEndTests/SqliteDapperTester.generated.cs index 86924139..2ea460ac 100644 --- a/end2end/EndToEndTests/SqliteDapperTester.generated.cs +++ b/end2end/EndToEndTests/SqliteDapperTester.generated.cs @@ -13,17 +13,17 @@ namespace EndToEndTests public partial class SqliteDapperTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -34,10 +34,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -53,7 +53,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -71,21 +71,21 @@ void AssertSequenceEquals(List x, List { @@ -102,7 +102,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -120,16 +120,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -162,7 +162,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -183,12 +183,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -222,7 +222,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -243,28 +243,28 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -280,7 +280,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -298,10 +298,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -311,7 +311,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -340,9 +340,9 @@ private static IEnumerable SqliteTypesTestCases [Test] [TestCaseSource(nameof(SqliteTypesTestCases))] - public async Task TestSqliteTypes(int? cInteger, decimal? cReal, string cText, byte[] cBlob, bool? cTextBoolOverride, bool? cIntegerBoolOverride, DateTime? cTextDatetimeOverride, DateTime? cIntegerDatetimeOverride, Instant? cTextNodaInstantOverride, Instant? cIntegerNodaInstantOverride) + public async Task TestSqliteTypesAsync(int? cInteger, decimal? cReal, string cText, byte[] cBlob, bool? cTextBoolOverride, bool? cIntegerBoolOverride, DateTime? cTextDatetimeOverride, DateTime? cIntegerDatetimeOverride, Instant? cTextNodaInstantOverride, Instant? cIntegerNodaInstantOverride) { - await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText, CBlob = cBlob, CTextBoolOverride = cTextBoolOverride, CIntegerBoolOverride = cIntegerBoolOverride, CTextDatetimeOverride = cTextDatetimeOverride, CIntegerDatetimeOverride = cIntegerDatetimeOverride, CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }); + await QuerySql.InsertSqliteTypesAsync(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText, CBlob = cBlob, CTextBoolOverride = cTextBoolOverride, CIntegerBoolOverride = cIntegerBoolOverride, CTextDatetimeOverride = cTextDatetimeOverride, CIntegerDatetimeOverride = cIntegerDatetimeOverride, CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }); var expected = new QuerySql.GetSqliteTypesRow { CInteger = cInteger, @@ -356,7 +356,7 @@ public async Task TestSqliteTypes(int? cInteger, decimal? cReal, string cText, b CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }; - var actual = await QuerySql.GetSqliteTypes(); + var actual = await QuerySql.GetSqliteTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetSqliteTypesRow x, QuerySql.GetSqliteTypesRow y) { @@ -374,16 +374,16 @@ void AssertSingularEquals(QuerySql.GetSqliteTypesRow x, QuerySql.GetSqliteTypesR } [Test] - public async Task TestGetAuthorByIdWithMultipleNamedParam() + public async Task TestGetAuthorByIdWithMultipleNamedParamAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); var expected = new QuerySql.GetAuthorByIdWithMultipleNamedParamRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthorByIdWithMultipleNamedParam(new QuerySql.GetAuthorByIdWithMultipleNamedParamArgs { IdArg = 1111, Take = 1 }); + var actual = await this.QuerySql.GetAuthorByIdWithMultipleNamedParamAsync(new QuerySql.GetAuthorByIdWithMultipleNamedParamArgs { IdArg = 1111, Take = 1 }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorByIdWithMultipleNamedParamRow x, QuerySql.GetAuthorByIdWithMultipleNamedParamRow y) { @@ -396,16 +396,16 @@ void AssertSingularEquals(QuerySql.GetAuthorByIdWithMultipleNamedParamRow x, Que [Test] [TestCase(-54355, 9787.66, "Have One On Me")] [TestCase(null, 0.0, null)] - public async Task TestSqliteDataTypesOverride(int? cInteger, decimal cReal, string cText) + public async Task TestSqliteDataTypesOverrideAsync(int? cInteger, decimal cReal, string cText) { - await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText }); + await QuerySql.InsertSqliteTypesAsync(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText }); var expected = new QuerySql.GetSqliteFunctionsRow { MaxInteger = cInteger, MaxReal = cReal, MaxText = cText }; - var actual = await QuerySql.GetSqliteFunctions(); + var actual = await QuerySql.GetSqliteFunctionsAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetSqliteFunctionsRow x, QuerySql.GetSqliteFunctionsRow y) { @@ -419,10 +419,10 @@ void AssertSingularEquals(QuerySql.GetSqliteFunctionsRow x, QuerySql.GetSqliteFu [TestCase(100, 312, -7541.3309, "Johnny B. Good")] [TestCase(500, -768, 8453.5678, "Bad to the Bone")] [TestCase(10, null, null, null)] - public async Task TestCopyFrom(int batchSize, int? cInteger, decimal? cReal, string cText) + public async Task TestCopyFromAsync(int batchSize, int? cInteger, decimal? cReal, string cText) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertSqliteTypesBatchArgs { CInteger = cInteger, CReal = cReal, CText = cText }).ToList(); - await QuerySql.InsertSqliteTypesBatch(batchArgs); + await QuerySql.InsertSqliteTypesBatchAsync(batchArgs); var expected = new QuerySql.GetSqliteTypesCntRow { Cnt = batchSize, @@ -430,7 +430,7 @@ public async Task TestCopyFrom(int batchSize, int? cInteger, decimal? cReal, str CReal = cReal, CText = cText }; - var actual = await QuerySql.GetSqliteTypesCnt(); + var actual = await QuerySql.GetSqliteTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetSqliteTypesCntRow x, QuerySql.GetSqliteTypesCntRow y) { @@ -442,14 +442,14 @@ void AssertSingularEquals(QuerySql.GetSqliteTypesCntRow x, QuerySql.GetSqliteTyp } [Test] - public async Task TestSqliteTransaction() + public async Task TestSqliteTransactionAsync() { var connection = new Microsoft.Data.Sqlite.SqliteConnection(Environment.GetEnvironmentVariable(EndToEndCommon.SqliteConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); transaction.Commit(); var expected = new QuerySql.GetAuthorRow @@ -458,7 +458,7 @@ public async Task TestSqliteTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -469,15 +469,15 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestSqliteTransactionRollback() + public async Task TestSqliteTransactionRollbackAsync() { var connection = new Microsoft.Data.Sqlite.SqliteConnection(Environment.GetEnvironmentVariable(EndToEndCommon.SqliteConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var sqlQueryWithTx = QuerySql.WithTransaction(transaction); - await sqlQueryWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await sqlQueryWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); transaction.Rollback(); - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } } diff --git a/end2end/EndToEndTests/SqliteTester.cs b/end2end/EndToEndTests/SqliteTester.cs index 9943c543..c1247c9b 100644 --- a/end2end/EndToEndTests/SqliteTester.cs +++ b/end2end/EndToEndTests/SqliteTester.cs @@ -13,7 +13,7 @@ public partial class SqliteTester [TearDown] public async Task EmptyTestsTable() { - await QuerySql.DeleteAllAuthors(); - await QuerySql.DeleteAllSqliteTypes(); + await QuerySql.DeleteAllAuthorsAsync(); + await QuerySql.DeleteAllSqliteTypesAsync(); } } \ No newline at end of file diff --git a/end2end/EndToEndTests/SqliteTester.generated.cs b/end2end/EndToEndTests/SqliteTester.generated.cs index 92275628..147c1207 100644 --- a/end2end/EndToEndTests/SqliteTester.generated.cs +++ b/end2end/EndToEndTests/SqliteTester.generated.cs @@ -13,17 +13,17 @@ namespace EndToEndTests public partial class SqliteTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -34,10 +34,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -53,7 +53,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -71,21 +71,21 @@ void AssertSequenceEquals(List x, List { @@ -102,7 +102,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -120,16 +120,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -162,7 +162,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -183,12 +183,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -222,7 +222,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -243,28 +243,28 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -280,7 +280,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -298,10 +298,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -311,7 +311,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -340,9 +340,9 @@ private static IEnumerable SqliteTypesTestCases [Test] [TestCaseSource(nameof(SqliteTypesTestCases))] - public async Task TestSqliteTypes(int? cInteger, decimal? cReal, string cText, byte[] cBlob, bool? cTextBoolOverride, bool? cIntegerBoolOverride, DateTime? cTextDatetimeOverride, DateTime? cIntegerDatetimeOverride, Instant? cTextNodaInstantOverride, Instant? cIntegerNodaInstantOverride) + public async Task TestSqliteTypesAsync(int? cInteger, decimal? cReal, string cText, byte[] cBlob, bool? cTextBoolOverride, bool? cIntegerBoolOverride, DateTime? cTextDatetimeOverride, DateTime? cIntegerDatetimeOverride, Instant? cTextNodaInstantOverride, Instant? cIntegerNodaInstantOverride) { - await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText, CBlob = cBlob, CTextBoolOverride = cTextBoolOverride, CIntegerBoolOverride = cIntegerBoolOverride, CTextDatetimeOverride = cTextDatetimeOverride, CIntegerDatetimeOverride = cIntegerDatetimeOverride, CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }); + await QuerySql.InsertSqliteTypesAsync(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText, CBlob = cBlob, CTextBoolOverride = cTextBoolOverride, CIntegerBoolOverride = cIntegerBoolOverride, CTextDatetimeOverride = cTextDatetimeOverride, CIntegerDatetimeOverride = cIntegerDatetimeOverride, CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }); var expected = new QuerySql.GetSqliteTypesRow { CInteger = cInteger, @@ -356,7 +356,7 @@ public async Task TestSqliteTypes(int? cInteger, decimal? cReal, string cText, b CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }; - var actual = await QuerySql.GetSqliteTypes(); + var actual = await QuerySql.GetSqliteTypesAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetSqliteTypesRow x, QuerySql.GetSqliteTypesRow y) { @@ -374,16 +374,16 @@ void AssertSingularEquals(QuerySql.GetSqliteTypesRow x, QuerySql.GetSqliteTypesR } [Test] - public async Task TestGetAuthorByIdWithMultipleNamedParam() + public async Task TestGetAuthorByIdWithMultipleNamedParamAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); var expected = new QuerySql.GetAuthorByIdWithMultipleNamedParamRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthorByIdWithMultipleNamedParam(new QuerySql.GetAuthorByIdWithMultipleNamedParamArgs { IdArg = 1111, Take = 1 }); + var actual = await this.QuerySql.GetAuthorByIdWithMultipleNamedParamAsync(new QuerySql.GetAuthorByIdWithMultipleNamedParamArgs { IdArg = 1111, Take = 1 }); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetAuthorByIdWithMultipleNamedParamRow x, QuerySql.GetAuthorByIdWithMultipleNamedParamRow y) { @@ -396,16 +396,16 @@ void AssertSingularEquals(QuerySql.GetAuthorByIdWithMultipleNamedParamRow x, Que [Test] [TestCase(-54355, 9787.66, "Have One On Me")] [TestCase(null, 0.0, null)] - public async Task TestSqliteDataTypesOverride(int? cInteger, decimal cReal, string cText) + public async Task TestSqliteDataTypesOverrideAsync(int? cInteger, decimal cReal, string cText) { - await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText }); + await QuerySql.InsertSqliteTypesAsync(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText }); var expected = new QuerySql.GetSqliteFunctionsRow { MaxInteger = cInteger, MaxReal = cReal, MaxText = cText }; - var actual = await QuerySql.GetSqliteFunctions(); + var actual = await QuerySql.GetSqliteFunctionsAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetSqliteFunctionsRow x, QuerySql.GetSqliteFunctionsRow y) { @@ -419,10 +419,10 @@ void AssertSingularEquals(QuerySql.GetSqliteFunctionsRow x, QuerySql.GetSqliteFu [TestCase(100, 312, -7541.3309, "Johnny B. Good")] [TestCase(500, -768, 8453.5678, "Bad to the Bone")] [TestCase(10, null, null, null)] - public async Task TestCopyFrom(int batchSize, int? cInteger, decimal? cReal, string cText) + public async Task TestCopyFromAsync(int batchSize, int? cInteger, decimal? cReal, string cText) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertSqliteTypesBatchArgs { CInteger = cInteger, CReal = cReal, CText = cText }).ToList(); - await QuerySql.InsertSqliteTypesBatch(batchArgs); + await QuerySql.InsertSqliteTypesBatchAsync(batchArgs); var expected = new QuerySql.GetSqliteTypesCntRow { Cnt = batchSize, @@ -430,7 +430,7 @@ public async Task TestCopyFrom(int batchSize, int? cInteger, decimal? cReal, str CReal = cReal, CText = cText }; - var actual = await QuerySql.GetSqliteTypesCnt(); + var actual = await QuerySql.GetSqliteTypesCntAsync(); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetSqliteTypesCntRow x, QuerySql.GetSqliteTypesCntRow y) { @@ -442,14 +442,14 @@ void AssertSingularEquals(QuerySql.GetSqliteTypesCntRow x, QuerySql.GetSqliteTyp } [Test] - public async Task TestSqliteTransaction() + public async Task TestSqliteTransactionAsync() { var connection = new Microsoft.Data.Sqlite.SqliteConnection(Environment.GetEnvironmentVariable(EndToEndCommon.SqliteConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); transaction.Commit(); var expected = new QuerySql.GetAuthorRow @@ -458,7 +458,7 @@ public async Task TestSqliteTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual.Value); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -469,15 +469,15 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestSqliteTransactionRollback() + public async Task TestSqliteTransactionRollbackAsync() { var connection = new Microsoft.Data.Sqlite.SqliteConnection(Environment.GetEnvironmentVariable(EndToEndCommon.SqliteConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var sqlQueryWithTx = QuerySql.WithTransaction(transaction); - await sqlQueryWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await sqlQueryWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); transaction.Rollback(); - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } } diff --git a/end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.cs b/end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.cs index 4df7d463..9b65d900 100644 --- a/end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.cs +++ b/end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.cs @@ -13,12 +13,12 @@ public partial class MySqlConnectorDapperTester [TearDown] public async Task EmptyTestsTable() { - await QuerySql.DeleteAllAuthors(); - await QuerySql.TruncateExtendedBios(); - await QuerySql.TruncateMysqlNumericTypes(); - await QuerySql.TruncateMysqlStringTypes(); - await QuerySql.TruncateMysqlDatetimeTypes(); - await QuerySql.TruncateMysqlBinaryTypes(); + await QuerySql.DeleteAllAuthorsAsync(); + await QuerySql.TruncateExtendedBiosAsync(); + await QuerySql.TruncateMysqlNumericTypesAsync(); + await QuerySql.TruncateMysqlStringTypesAsync(); + await QuerySql.TruncateMysqlDatetimeTypesAsync(); + await QuerySql.TruncateMysqlBinaryTypesAsync(); } } } \ No newline at end of file diff --git a/end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.generated.cs b/end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.generated.cs index 314d17a1..778323e9 100644 --- a/end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.generated.cs +++ b/end2end/EndToEndTestsLegacy/MySqlConnectorDapperTester.generated.cs @@ -14,17 +14,17 @@ namespace EndToEndTests public partial class MySqlConnectorDapperTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -35,10 +35,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -54,7 +54,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -72,21 +72,21 @@ void AssertSequenceEquals(List x, List { @@ -103,7 +103,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -121,16 +121,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -163,7 +163,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -184,12 +184,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -223,7 +223,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -244,28 +244,28 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -281,7 +281,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -299,10 +299,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -312,7 +312,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -336,8 +336,8 @@ public async Task TestMySqlTransaction() await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); await transaction.CommitAsync(); var expected = new QuerySql.GetAuthorRow @@ -346,7 +346,7 @@ public async Task TestMySqlTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -363,9 +363,9 @@ public async Task TestMySqlTransactionRollback() await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); await transaction.RollbackAsync(); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } @@ -374,16 +374,16 @@ public async Task TestMySqlTransactionRollback() [TestCase(null, null, "1971-01-01 00:00:00")] public async Task TestMySqlDataTypesOverride(int? cInt, string cVarchar, DateTime cTimestamp) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CInt = cInt }); - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CVarchar = cVarchar }); - await QuerySql.InsertMysqlDatetimeTypes(new QuerySql.InsertMysqlDatetimeTypesArgs { CTimestamp = cTimestamp }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CInt = cInt }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CVarchar = cVarchar }); + await QuerySql.InsertMysqlDatetimeTypesAsync(new QuerySql.InsertMysqlDatetimeTypesArgs { CTimestamp = cTimestamp }); var expected = new QuerySql.GetMysqlFunctionsRow { MaxInt = cInt, MaxVarchar = cVarchar, MaxTimestamp = cTimestamp }; - var actual = await QuerySql.GetMysqlFunctions(); + var actual = await QuerySql.GetMysqlFunctionsAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlFunctionsRow x, QuerySql.GetMysqlFunctionsRow y) { @@ -396,7 +396,7 @@ void AssertSingularEquals(QuerySql.GetMysqlFunctionsRow x, QuerySql.GetMysqlFunc [Test] public async Task TestMySqlScopedSchemaEnum() { - await this.QuerySql.CreateExtendedBio(new QuerySql.CreateExtendedBioArgs { AuthorName = "Bojack Horseman", Name = "One Trick Pony", BioType = BiosBioType.Memoir, AuthorType = new HashSet { BiosAuthorType.Author, BiosAuthorType.Translator } }); + await this.QuerySql.CreateExtendedBioAsync(new QuerySql.CreateExtendedBioArgs { AuthorName = "Bojack Horseman", Name = "One Trick Pony", BioType = BiosBioType.Memoir, AuthorType = new HashSet { BiosAuthorType.Author, BiosAuthorType.Translator } }); var expected = new QuerySql.GetFirstExtendedBioByTypeRow { AuthorName = "Bojack Horseman", @@ -408,7 +408,7 @@ public async Task TestMySqlScopedSchemaEnum() BiosAuthorType.Translator } }; - var actual = await this.QuerySql.GetFirstExtendedBioByType(new QuerySql.GetFirstExtendedBioByTypeArgs { BioType = BiosBioType.Memoir }); + var actual = await this.QuerySql.GetFirstExtendedBioByTypeAsync(new QuerySql.GetFirstExtendedBioByTypeArgs { BioType = BiosBioType.Memoir }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetFirstExtendedBioByTypeRow x, QuerySql.GetFirstExtendedBioByTypeRow y) { @@ -422,7 +422,7 @@ void AssertSingularEquals(QuerySql.GetFirstExtendedBioByTypeRow x, QuerySql.GetF [Test] public void TestMySqlInvalidJson() { - Assert.ThrowsAsync(async () => await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); } [Test] @@ -430,7 +430,7 @@ public void TestMySqlInvalidJson() [TestCase(null, null, null, null, null, null, null, null)] public async Task TestMySqlStringTypes(string cChar, string cNchar, string cNationalChar, string cVarchar, string cTinytext, string cMediumtext, string cText, string cLongtext) { - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }); var expected = new QuerySql.GetMysqlStringTypesRow { CChar = cChar, @@ -442,7 +442,7 @@ public async Task TestMySqlStringTypes(string cChar, string cNchar, string cNati CText = cText, CLongtext = cLongtext }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -462,7 +462,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlSt [TestCase(null, null, null, null, null, null, null, null, null)] public async Task TestMySqlIntegerTypes(bool? cBool, bool? cBoolean, short? cTinyint, short? cYear, short? cSmallint, int? cMediumint, int? cInt, int? cInteger, long? cBigint) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }); var expected = new QuerySql.GetMysqlNumericTypesRow { CBool = cBool, @@ -474,7 +474,7 @@ public async Task TestMySqlIntegerTypes(bool? cBool, bool? cBoolean, short? cTin CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetMysqlNumericTypes(); + var actual = await QuerySql.GetMysqlNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlNumericTypesRow y) { @@ -494,7 +494,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlN [TestCase(null, null, null, null, null, null, null)] public async Task TestMySqlFloatingPointTypes(float? cFloat, decimal? cNumeric, decimal? cDecimal, decimal? cDec, decimal? cFixed, double? cDouble, double? cDoublePrecision) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }); var expected = new QuerySql.GetMysqlNumericTypesRow { CFloat = cFloat, @@ -505,7 +505,7 @@ public async Task TestMySqlFloatingPointTypes(float? cFloat, decimal? cNumeric, CDouble = cDouble, CDoublePrecision = cDoublePrecision }; - var actual = await QuerySql.GetMysqlNumericTypes(); + var actual = await QuerySql.GetMysqlNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlNumericTypesRow y) { @@ -532,7 +532,7 @@ private static IEnumerable MySqlDateTimeTypesTestCases [TestCaseSource(nameof(MySqlDateTimeTypesTestCases))] public async Task TestMySqlDateTimeTypes(short? cYear, DateTime? cDate, DateTime? cDatetime, DateTime? cTimestamp, TimeSpan? cTime, Instant? cTimestampNodaInstantOverride) { - await QuerySql.InsertMysqlDatetimeTypes(new QuerySql.InsertMysqlDatetimeTypesArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); + await QuerySql.InsertMysqlDatetimeTypesAsync(new QuerySql.InsertMysqlDatetimeTypesArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); var expected = new QuerySql.GetMysqlDatetimeTypesRow { CYear = cYear, @@ -542,7 +542,7 @@ public async Task TestMySqlDateTimeTypes(short? cYear, DateTime? cDate, DateTime CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }; - var actual = await QuerySql.GetMysqlDatetimeTypes(); + var actual = await QuerySql.GetMysqlDatetimeTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesRow x, QuerySql.GetMysqlDatetimeTypesRow y) { @@ -561,7 +561,7 @@ void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesRow x, QuerySql.GetMysql [TestCase(null, null, null, null, null, null, null)] public async Task TestMySqlBinaryTypes(byte? cBit, byte[] cBinary, byte[] cVarbinary, byte[] cTinyblob, byte[] cBlob, byte[] cMediumblob, byte[] cLongblob) { - await QuerySql.InsertMysqlBinaryTypes(new QuerySql.InsertMysqlBinaryTypesArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }); + await QuerySql.InsertMysqlBinaryTypesAsync(new QuerySql.InsertMysqlBinaryTypesArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }); var expected = new QuerySql.GetMysqlBinaryTypesRow { CBit = cBit, @@ -572,7 +572,7 @@ public async Task TestMySqlBinaryTypes(byte? cBit, byte[] cBinary, byte[] cVarbi CMediumblob = cMediumblob, CLongblob = cLongblob }; - var actual = await QuerySql.GetMysqlBinaryTypes(); + var actual = await QuerySql.GetMysqlBinaryTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlBinaryTypesRow x, QuerySql.GetMysqlBinaryTypesRow y) { @@ -599,13 +599,13 @@ private static IEnumerable MySqlEnumTypesTestCases [TestCaseSource(nameof(MySqlEnumTypesTestCases))] public async Task TestMySqlStringTypes(MysqlStringTypesCEnum? cEnum, HashSet cSet) { - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CEnum = cEnum, CSet = cSet }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CEnum = cEnum, CSet = cSet }); var expected = new QuerySql.GetMysqlStringTypesRow { CEnum = cEnum, CSet = cSet }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -622,13 +622,13 @@ public async Task TestMySqlJsonDataType(string cJson) JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CJson = cParsedJson, CJsonStringOverride = cJson }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CJson = cParsedJson, CJsonStringOverride = cJson }); var expected = new QuerySql.GetMysqlStringTypesRow { CJson = cParsedJson, CJsonStringOverride = cJson }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -645,7 +645,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlSt public async Task TestStringCopyFrom(int batchSize, string cChar, string cNchar, string cNationalChar, string cVarchar, string cTinytext, string cMediumtext, string cText, string cLongtext) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, @@ -658,7 +658,7 @@ public async Task TestStringCopyFrom(int batchSize, string cChar, string cNchar, CText = cText, CLongtext = cLongtext }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { @@ -680,7 +680,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysq public async Task TestIntegerCopyFrom(int batchSize, bool? cBool, bool? cBoolean, short? cTinyint, short? cSmallint, int? cMediumint, int? cInt, int? cInteger, long? cBigint) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlNumericTypesBatchArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }).ToList(); - await QuerySql.InsertMysqlNumericTypesBatch(batchArgs); + await QuerySql.InsertMysqlNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlNumericTypesCntRow { Cnt = batchSize, @@ -693,7 +693,7 @@ public async Task TestIntegerCopyFrom(int batchSize, bool? cBool, bool? cBoolean CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetMysqlNumericTypesCnt(); + var actual = await QuerySql.GetMysqlNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMysqlNumericTypesCntRow y) { @@ -715,7 +715,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMys public async Task TestFloatingPointCopyFrom(int batchSize, float? cFloat, decimal? cNumeric, decimal? cDecimal, decimal? cDec, decimal? cFixed, double? cDouble, double? cDoublePrecision) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlNumericTypesBatchArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }).ToList(); - await QuerySql.InsertMysqlNumericTypesBatch(batchArgs); + await QuerySql.InsertMysqlNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlNumericTypesCntRow { Cnt = batchSize, @@ -727,7 +727,7 @@ public async Task TestFloatingPointCopyFrom(int batchSize, float? cFloat, decima CDouble = cDouble, CDoublePrecision = cDoublePrecision }; - var actual = await QuerySql.GetMysqlNumericTypesCnt(); + var actual = await QuerySql.GetMysqlNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMysqlNumericTypesCntRow y) { @@ -748,7 +748,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMys public async Task TestDateTimeCopyFrom(int batchSize, short? cYear, DateTime? cDate, DateTime? cDatetime, DateTime? cTimestamp, TimeSpan? cTime) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlDatetimeTypesBatchArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime }).ToList(); - await QuerySql.InsertMysqlDatetimeTypesBatch(batchArgs); + await QuerySql.InsertMysqlDatetimeTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlDatetimeTypesCntRow { Cnt = batchSize, @@ -758,7 +758,7 @@ public async Task TestDateTimeCopyFrom(int batchSize, short? cYear, DateTime? cD CTimestamp = cTimestamp, CTime = cTime }; - var actual = await QuerySql.GetMysqlDatetimeTypesCnt(); + var actual = await QuerySql.GetMysqlDatetimeTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesCntRow x, QuerySql.GetMysqlDatetimeTypesCntRow y) { @@ -778,7 +778,7 @@ void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesCntRow x, QuerySql.GetMy public async Task TestBinaryCopyFrom(int batchSize, byte? cBit, byte[] cBinary, byte[] cVarbinary, byte[] cTinyblob, byte[] cBlob, byte[] cMediumblob, byte[] cLongblob) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlBinaryTypesBatchArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }).ToList(); - await QuerySql.InsertMysqlBinaryTypesBatch(batchArgs); + await QuerySql.InsertMysqlBinaryTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlBinaryTypesCntRow { Cnt = batchSize, @@ -790,7 +790,7 @@ public async Task TestBinaryCopyFrom(int batchSize, byte? cBit, byte[] cBinary, CMediumblob = cMediumblob, CLongblob = cLongblob }; - var actual = await QuerySql.GetMysqlBinaryTypesCnt(); + var actual = await QuerySql.GetMysqlBinaryTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlBinaryTypesCntRow x, QuerySql.GetMysqlBinaryTypesCntRow y) { @@ -819,14 +819,14 @@ private static IEnumerable MySqlEnumCopyFromTestCases public async Task TestCopyFrom(int batchSize, MysqlStringTypesCEnum? cEnum, HashSet cSet) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CEnum = cEnum, CSet = cSet }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, CEnum = cEnum, CSet = cSet }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { @@ -845,13 +845,13 @@ public async Task TestJsonCopyFrom(int batchSize, string cJson) if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CJson = cParsedJson }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, CJson = cParsedJson }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { diff --git a/end2end/EndToEndTestsLegacy/MySqlConnectorTester.cs b/end2end/EndToEndTestsLegacy/MySqlConnectorTester.cs index b0f68b1b..d1d697a6 100644 --- a/end2end/EndToEndTestsLegacy/MySqlConnectorTester.cs +++ b/end2end/EndToEndTestsLegacy/MySqlConnectorTester.cs @@ -13,12 +13,12 @@ public partial class MySqlConnectorTester [TearDown] public async Task EmptyTestsTable() { - await QuerySql.DeleteAllAuthors(); - await QuerySql.TruncateExtendedBios(); - await QuerySql.TruncateMysqlNumericTypes(); - await QuerySql.TruncateMysqlStringTypes(); - await QuerySql.TruncateMysqlDatetimeTypes(); - await QuerySql.TruncateMysqlBinaryTypes(); + await QuerySql.DeleteAllAuthorsAsync(); + await QuerySql.TruncateExtendedBiosAsync(); + await QuerySql.TruncateMysqlNumericTypesAsync(); + await QuerySql.TruncateMysqlStringTypesAsync(); + await QuerySql.TruncateMysqlDatetimeTypesAsync(); + await QuerySql.TruncateMysqlBinaryTypesAsync(); } } } \ No newline at end of file diff --git a/end2end/EndToEndTestsLegacy/MySqlConnectorTester.generated.cs b/end2end/EndToEndTestsLegacy/MySqlConnectorTester.generated.cs index 16f149ec..b04b1454 100644 --- a/end2end/EndToEndTestsLegacy/MySqlConnectorTester.generated.cs +++ b/end2end/EndToEndTestsLegacy/MySqlConnectorTester.generated.cs @@ -14,17 +14,17 @@ namespace EndToEndTests public partial class MySqlConnectorTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -35,10 +35,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -54,7 +54,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -72,21 +72,21 @@ void AssertSequenceEquals(List x, List { @@ -103,7 +103,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -121,16 +121,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -163,7 +163,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -184,12 +184,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -223,7 +223,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -244,28 +244,28 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -281,7 +281,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -299,10 +299,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -312,7 +312,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -336,8 +336,8 @@ public async Task TestMySqlTransaction() await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); await transaction.CommitAsync(); var expected = new QuerySql.GetAuthorRow @@ -346,7 +346,7 @@ public async Task TestMySqlTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -363,9 +363,9 @@ public async Task TestMySqlTransactionRollback() await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); await transaction.RollbackAsync(); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } @@ -374,16 +374,16 @@ public async Task TestMySqlTransactionRollback() [TestCase(null, null, "1971-01-01 00:00:00")] public async Task TestMySqlDataTypesOverride(int? cInt, string cVarchar, DateTime cTimestamp) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CInt = cInt }); - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CVarchar = cVarchar }); - await QuerySql.InsertMysqlDatetimeTypes(new QuerySql.InsertMysqlDatetimeTypesArgs { CTimestamp = cTimestamp }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CInt = cInt }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CVarchar = cVarchar }); + await QuerySql.InsertMysqlDatetimeTypesAsync(new QuerySql.InsertMysqlDatetimeTypesArgs { CTimestamp = cTimestamp }); var expected = new QuerySql.GetMysqlFunctionsRow { MaxInt = cInt, MaxVarchar = cVarchar, MaxTimestamp = cTimestamp }; - var actual = await QuerySql.GetMysqlFunctions(); + var actual = await QuerySql.GetMysqlFunctionsAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlFunctionsRow x, QuerySql.GetMysqlFunctionsRow y) { @@ -396,7 +396,7 @@ void AssertSingularEquals(QuerySql.GetMysqlFunctionsRow x, QuerySql.GetMysqlFunc [Test] public async Task TestMySqlScopedSchemaEnum() { - await this.QuerySql.CreateExtendedBio(new QuerySql.CreateExtendedBioArgs { AuthorName = "Bojack Horseman", Name = "One Trick Pony", BioType = BiosBioType.Memoir, AuthorType = new HashSet { BiosAuthorType.Author, BiosAuthorType.Translator } }); + await this.QuerySql.CreateExtendedBioAsync(new QuerySql.CreateExtendedBioArgs { AuthorName = "Bojack Horseman", Name = "One Trick Pony", BioType = BiosBioType.Memoir, AuthorType = new HashSet { BiosAuthorType.Author, BiosAuthorType.Translator } }); var expected = new QuerySql.GetFirstExtendedBioByTypeRow { AuthorName = "Bojack Horseman", @@ -408,7 +408,7 @@ public async Task TestMySqlScopedSchemaEnum() BiosAuthorType.Translator } }; - var actual = await this.QuerySql.GetFirstExtendedBioByType(new QuerySql.GetFirstExtendedBioByTypeArgs { BioType = BiosBioType.Memoir }); + var actual = await this.QuerySql.GetFirstExtendedBioByTypeAsync(new QuerySql.GetFirstExtendedBioByTypeArgs { BioType = BiosBioType.Memoir }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetFirstExtendedBioByTypeRow x, QuerySql.GetFirstExtendedBioByTypeRow y) { @@ -422,7 +422,7 @@ void AssertSingularEquals(QuerySql.GetFirstExtendedBioByTypeRow x, QuerySql.GetF [Test] public void TestMySqlInvalidJson() { - Assert.ThrowsAsync(async () => await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); } [Test] @@ -430,7 +430,7 @@ public void TestMySqlInvalidJson() [TestCase(null, null, null, null, null, null, null, null)] public async Task TestMySqlStringTypes(string cChar, string cNchar, string cNationalChar, string cVarchar, string cTinytext, string cMediumtext, string cText, string cLongtext) { - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }); var expected = new QuerySql.GetMysqlStringTypesRow { CChar = cChar, @@ -442,7 +442,7 @@ public async Task TestMySqlStringTypes(string cChar, string cNchar, string cNati CText = cText, CLongtext = cLongtext }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -462,7 +462,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlSt [TestCase(null, null, null, null, null, null, null, null, null)] public async Task TestMySqlIntegerTypes(bool? cBool, bool? cBoolean, short? cTinyint, short? cYear, short? cSmallint, int? cMediumint, int? cInt, int? cInteger, long? cBigint) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }); var expected = new QuerySql.GetMysqlNumericTypesRow { CBool = cBool, @@ -474,7 +474,7 @@ public async Task TestMySqlIntegerTypes(bool? cBool, bool? cBoolean, short? cTin CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetMysqlNumericTypes(); + var actual = await QuerySql.GetMysqlNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlNumericTypesRow y) { @@ -494,7 +494,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlN [TestCase(null, null, null, null, null, null, null)] public async Task TestMySqlFloatingPointTypes(float? cFloat, decimal? cNumeric, decimal? cDecimal, decimal? cDec, decimal? cFixed, double? cDouble, double? cDoublePrecision) { - await QuerySql.InsertMysqlNumericTypes(new QuerySql.InsertMysqlNumericTypesArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }); + await QuerySql.InsertMysqlNumericTypesAsync(new QuerySql.InsertMysqlNumericTypesArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }); var expected = new QuerySql.GetMysqlNumericTypesRow { CFloat = cFloat, @@ -505,7 +505,7 @@ public async Task TestMySqlFloatingPointTypes(float? cFloat, decimal? cNumeric, CDouble = cDouble, CDoublePrecision = cDoublePrecision }; - var actual = await QuerySql.GetMysqlNumericTypes(); + var actual = await QuerySql.GetMysqlNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesRow x, QuerySql.GetMysqlNumericTypesRow y) { @@ -532,7 +532,7 @@ private static IEnumerable MySqlDateTimeTypesTestCases [TestCaseSource(nameof(MySqlDateTimeTypesTestCases))] public async Task TestMySqlDateTimeTypes(short? cYear, DateTime? cDate, DateTime? cDatetime, DateTime? cTimestamp, TimeSpan? cTime, Instant? cTimestampNodaInstantOverride) { - await QuerySql.InsertMysqlDatetimeTypes(new QuerySql.InsertMysqlDatetimeTypesArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); + await QuerySql.InsertMysqlDatetimeTypesAsync(new QuerySql.InsertMysqlDatetimeTypesArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); var expected = new QuerySql.GetMysqlDatetimeTypesRow { CYear = cYear, @@ -542,7 +542,7 @@ public async Task TestMySqlDateTimeTypes(short? cYear, DateTime? cDate, DateTime CTime = cTime, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }; - var actual = await QuerySql.GetMysqlDatetimeTypes(); + var actual = await QuerySql.GetMysqlDatetimeTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesRow x, QuerySql.GetMysqlDatetimeTypesRow y) { @@ -561,7 +561,7 @@ void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesRow x, QuerySql.GetMysql [TestCase(null, null, null, null, null, null, null)] public async Task TestMySqlBinaryTypes(byte? cBit, byte[] cBinary, byte[] cVarbinary, byte[] cTinyblob, byte[] cBlob, byte[] cMediumblob, byte[] cLongblob) { - await QuerySql.InsertMysqlBinaryTypes(new QuerySql.InsertMysqlBinaryTypesArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }); + await QuerySql.InsertMysqlBinaryTypesAsync(new QuerySql.InsertMysqlBinaryTypesArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }); var expected = new QuerySql.GetMysqlBinaryTypesRow { CBit = cBit, @@ -572,7 +572,7 @@ public async Task TestMySqlBinaryTypes(byte? cBit, byte[] cBinary, byte[] cVarbi CMediumblob = cMediumblob, CLongblob = cLongblob }; - var actual = await QuerySql.GetMysqlBinaryTypes(); + var actual = await QuerySql.GetMysqlBinaryTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlBinaryTypesRow x, QuerySql.GetMysqlBinaryTypesRow y) { @@ -599,13 +599,13 @@ private static IEnumerable MySqlEnumTypesTestCases [TestCaseSource(nameof(MySqlEnumTypesTestCases))] public async Task TestMySqlStringTypes(MysqlStringTypesCEnum? cEnum, HashSet cSet) { - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CEnum = cEnum, CSet = cSet }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CEnum = cEnum, CSet = cSet }); var expected = new QuerySql.GetMysqlStringTypesRow { CEnum = cEnum, CSet = cSet }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -622,13 +622,13 @@ public async Task TestMySqlJsonDataType(string cJson) JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; - await QuerySql.InsertMysqlStringTypes(new QuerySql.InsertMysqlStringTypesArgs { CJson = cParsedJson, CJsonStringOverride = cJson }); + await QuerySql.InsertMysqlStringTypesAsync(new QuerySql.InsertMysqlStringTypesArgs { CJson = cParsedJson, CJsonStringOverride = cJson }); var expected = new QuerySql.GetMysqlStringTypesRow { CJson = cParsedJson, CJsonStringOverride = cJson }; - var actual = await QuerySql.GetMysqlStringTypes(); + var actual = await QuerySql.GetMysqlStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlStringTypesRow y) { @@ -645,7 +645,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesRow x, QuerySql.GetMysqlSt public async Task TestStringCopyFrom(int batchSize, string cChar, string cNchar, string cNationalChar, string cVarchar, string cTinytext, string cMediumtext, string cText, string cLongtext) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CChar = cChar, CNchar = cNchar, CNationalChar = cNationalChar, CVarchar = cVarchar, CTinytext = cTinytext, CMediumtext = cMediumtext, CText = cText, CLongtext = cLongtext }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, @@ -658,7 +658,7 @@ public async Task TestStringCopyFrom(int batchSize, string cChar, string cNchar, CText = cText, CLongtext = cLongtext }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { @@ -680,7 +680,7 @@ void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysq public async Task TestIntegerCopyFrom(int batchSize, bool? cBool, bool? cBoolean, short? cTinyint, short? cSmallint, int? cMediumint, int? cInt, int? cInteger, long? cBigint) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlNumericTypesBatchArgs { CBool = cBool, CBoolean = cBoolean, CTinyint = cTinyint, CSmallint = cSmallint, CMediumint = cMediumint, CInt = cInt, CInteger = cInteger, CBigint = cBigint }).ToList(); - await QuerySql.InsertMysqlNumericTypesBatch(batchArgs); + await QuerySql.InsertMysqlNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlNumericTypesCntRow { Cnt = batchSize, @@ -693,7 +693,7 @@ public async Task TestIntegerCopyFrom(int batchSize, bool? cBool, bool? cBoolean CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetMysqlNumericTypesCnt(); + var actual = await QuerySql.GetMysqlNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMysqlNumericTypesCntRow y) { @@ -715,7 +715,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMys public async Task TestFloatingPointCopyFrom(int batchSize, float? cFloat, decimal? cNumeric, decimal? cDecimal, decimal? cDec, decimal? cFixed, double? cDouble, double? cDoublePrecision) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlNumericTypesBatchArgs { CFloat = cFloat, CNumeric = cNumeric, CDecimal = cDecimal, CDec = cDec, CFixed = cFixed, CDouble = cDouble, CDoublePrecision = cDoublePrecision }).ToList(); - await QuerySql.InsertMysqlNumericTypesBatch(batchArgs); + await QuerySql.InsertMysqlNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlNumericTypesCntRow { Cnt = batchSize, @@ -727,7 +727,7 @@ public async Task TestFloatingPointCopyFrom(int batchSize, float? cFloat, decima CDouble = cDouble, CDoublePrecision = cDoublePrecision }; - var actual = await QuerySql.GetMysqlNumericTypesCnt(); + var actual = await QuerySql.GetMysqlNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMysqlNumericTypesCntRow y) { @@ -748,7 +748,7 @@ void AssertSingularEquals(QuerySql.GetMysqlNumericTypesCntRow x, QuerySql.GetMys public async Task TestDateTimeCopyFrom(int batchSize, short? cYear, DateTime? cDate, DateTime? cDatetime, DateTime? cTimestamp, TimeSpan? cTime) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlDatetimeTypesBatchArgs { CYear = cYear, CDate = cDate, CDatetime = cDatetime, CTimestamp = cTimestamp, CTime = cTime }).ToList(); - await QuerySql.InsertMysqlDatetimeTypesBatch(batchArgs); + await QuerySql.InsertMysqlDatetimeTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlDatetimeTypesCntRow { Cnt = batchSize, @@ -758,7 +758,7 @@ public async Task TestDateTimeCopyFrom(int batchSize, short? cYear, DateTime? cD CTimestamp = cTimestamp, CTime = cTime }; - var actual = await QuerySql.GetMysqlDatetimeTypesCnt(); + var actual = await QuerySql.GetMysqlDatetimeTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesCntRow x, QuerySql.GetMysqlDatetimeTypesCntRow y) { @@ -778,7 +778,7 @@ void AssertSingularEquals(QuerySql.GetMysqlDatetimeTypesCntRow x, QuerySql.GetMy public async Task TestBinaryCopyFrom(int batchSize, byte? cBit, byte[] cBinary, byte[] cVarbinary, byte[] cTinyblob, byte[] cBlob, byte[] cMediumblob, byte[] cLongblob) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlBinaryTypesBatchArgs { CBit = cBit, CBinary = cBinary, CVarbinary = cVarbinary, CTinyblob = cTinyblob, CBlob = cBlob, CMediumblob = cMediumblob, CLongblob = cLongblob }).ToList(); - await QuerySql.InsertMysqlBinaryTypesBatch(batchArgs); + await QuerySql.InsertMysqlBinaryTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlBinaryTypesCntRow { Cnt = batchSize, @@ -790,7 +790,7 @@ public async Task TestBinaryCopyFrom(int batchSize, byte? cBit, byte[] cBinary, CMediumblob = cMediumblob, CLongblob = cLongblob }; - var actual = await QuerySql.GetMysqlBinaryTypesCnt(); + var actual = await QuerySql.GetMysqlBinaryTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlBinaryTypesCntRow x, QuerySql.GetMysqlBinaryTypesCntRow y) { @@ -819,14 +819,14 @@ private static IEnumerable MySqlEnumCopyFromTestCases public async Task TestCopyFrom(int batchSize, MysqlStringTypesCEnum? cEnum, HashSet cSet) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CEnum = cEnum, CSet = cSet }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, CEnum = cEnum, CSet = cSet }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { @@ -845,13 +845,13 @@ public async Task TestJsonCopyFrom(int batchSize, string cJson) if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertMysqlStringTypesBatchArgs { CJson = cParsedJson }).ToList(); - await QuerySql.InsertMysqlStringTypesBatch(batchArgs); + await QuerySql.InsertMysqlStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetMysqlStringTypesCntRow { Cnt = batchSize, CJson = cParsedJson }; - var actual = await QuerySql.GetMysqlStringTypesCnt(); + var actual = await QuerySql.GetMysqlStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetMysqlStringTypesCntRow x, QuerySql.GetMysqlStringTypesCntRow y) { diff --git a/end2end/EndToEndTestsLegacy/NpgsqlDapperTester.cs b/end2end/EndToEndTestsLegacy/NpgsqlDapperTester.cs index faab83e5..ec6c2736 100644 --- a/end2end/EndToEndTestsLegacy/NpgsqlDapperTester.cs +++ b/end2end/EndToEndTestsLegacy/NpgsqlDapperTester.cs @@ -13,14 +13,14 @@ public partial class NpgsqlDapperTester [TearDown] public async Task EmptyTestsTable() { - await QuerySql.TruncateAuthors(); - await QuerySql.TruncatePostgresNumericTypes(); - await QuerySql.TruncatePostgresStringTypes(); - await QuerySql.TruncatePostgresDateTimeTypes(); - await QuerySql.TruncatePostgresGeoTypes(); - await QuerySql.TruncatePostgresNetworkTypes(); - await QuerySql.TruncatePostgresArrayTypes(); - await QuerySql.TruncatePostgresSpecialTypes(); + await QuerySql.TruncateAuthorsAsync(); + await QuerySql.TruncatePostgresNumericTypesAsync(); + await QuerySql.TruncatePostgresStringTypesAsync(); + await QuerySql.TruncatePostgresDateTimeTypesAsync(); + await QuerySql.TruncatePostgresGeoTypesAsync(); + await QuerySql.TruncatePostgresNetworkTypesAsync(); + await QuerySql.TruncatePostgresArrayTypesAsync(); + await QuerySql.TruncatePostgresSpecialTypesAsync(); } } } \ No newline at end of file diff --git a/end2end/EndToEndTestsLegacy/NpgsqlDapperTester.generated.cs b/end2end/EndToEndTestsLegacy/NpgsqlDapperTester.generated.cs index 7d89c64f..f1640628 100644 --- a/end2end/EndToEndTestsLegacy/NpgsqlDapperTester.generated.cs +++ b/end2end/EndToEndTestsLegacy/NpgsqlDapperTester.generated.cs @@ -18,17 +18,17 @@ namespace EndToEndTests public partial class NpgsqlDapperTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -39,10 +39,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -58,7 +58,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -76,21 +76,21 @@ void AssertSequenceEquals(List x, List { @@ -107,7 +107,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -125,16 +125,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -167,7 +167,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -188,12 +188,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -227,7 +227,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -248,10 +248,10 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -267,7 +267,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -285,10 +285,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -298,7 +298,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -316,14 +316,14 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestPostgresTransaction() + public async Task TestPostgresTransactionAsync() { var connection = new Npgsql.NpgsqlConnection(Environment.GetEnvironmentVariable(EndToEndCommon.PostgresConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); await transaction.CommitAsync(); var expected = new QuerySql.GetAuthorRow @@ -332,7 +332,7 @@ public async Task TestPostgresTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -343,52 +343,52 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestPostgresTransactionRollback() + public async Task TestPostgresTransactionRollbackAsync() { var connection = new Npgsql.NpgsqlConnection(Environment.GetEnvironmentVariable(EndToEndCommon.PostgresConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var sqlQueryWithTx = QuerySql.WithTransaction(transaction); - await sqlQueryWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await sqlQueryWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); await transaction.RollbackAsync(); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } [Test] - public async Task TestArray() + public async Task TestArrayAsync() { - var id1 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); - var bojackId = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthorsByIds(new QuerySql.GetAuthorsByIdsArgs { LongArr1 = new[] { id1, bojackId } }); + var id1 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); + var bojackId = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorsByIdsAsync(new QuerySql.GetAuthorsByIdsArgs { LongArr1 = new[] { id1, bojackId } }); ClassicAssert.AreEqual(2, actual.Count); } [Test] - public async Task TestMultipleArrays() + public async Task TestMultipleArraysAsync() { - var id1 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); - var id2 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Only 2 things are infinite, the universe and human stupidity" }); - var bojackId = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthorsByIdsAndNames(new QuerySql.GetAuthorsByIdsAndNamesArgs { LongArr1 = new[] { id1, bojackId }, StringArr2 = new[] { "Albert Einstein" } }); + var id1 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); + var id2 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Only 2 things are infinite, the universe and human stupidity" }); + var bojackId = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorsByIdsAndNamesAsync(new QuerySql.GetAuthorsByIdsAndNamesArgs { LongArr1 = new[] { id1, bojackId }, StringArr2 = new[] { "Albert Einstein" } }); ClassicAssert.AreEqual(1, actual.Count); } [Test] [TestCase(-54355, "White Light from the Mouth of Infinity", "2022-10-2 15:44:01+09:00")] [TestCase(null, null, "1970-01-01 00:00:00")] - public async Task TestPostgresDataTypesOverride(int? cInteger, string cVarchar, DateTime cTimestamp) + public async Task TestPostgresDataTypesOverrideAsync(int? cInteger, string cVarchar, DateTime cTimestamp) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CInteger = cInteger }); - await QuerySql.InsertPostgresDateTimeTypes(new QuerySql.InsertPostgresDateTimeTypesArgs { CTimestamp = cTimestamp }); - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CVarchar = cVarchar }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CInteger = cInteger }); + await QuerySql.InsertPostgresDateTimeTypesAsync(new QuerySql.InsertPostgresDateTimeTypesArgs { CTimestamp = cTimestamp }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CVarchar = cVarchar }); var expected = new QuerySql.GetPostgresFunctionsRow { MaxInteger = cInteger, MaxVarchar = cVarchar, MaxTimestamp = cTimestamp }; - var actual = await QuerySql.GetPostgresFunctions(); + var actual = await QuerySql.GetPostgresFunctionsAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresFunctionsRow x, QuerySql.GetPostgresFunctionsRow y) { @@ -401,22 +401,22 @@ void AssertSingularEquals(QuerySql.GetPostgresFunctionsRow x, QuerySql.GetPostgr [Test] public void TestPostgresInvalidJson() { - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonpath = "SOME INVALID JSONPATH" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonpath = "SOME INVALID JSONPATH" })); } [Test] public void TestPostgresInvalidXml() { - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CXmlStringOverride = "SOME INVALID XML" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CXmlStringOverride = "SOME INVALID XML" })); } [Test] [TestCase("E", "It takes a nation of millions to hold us back", "Rebel Without a Pause", "Master of Puppets", "Prophets of Rage")] [TestCase(null, null, null, null, null)] - public async Task TestPostgresStringTypes(string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) + public async Task TestPostgresStringTypesAsync(string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) { - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText, }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText, }); var expected = new QuerySql.GetPostgresStringTypesRow { CChar = cChar, @@ -425,7 +425,7 @@ public async Task TestPostgresStringTypes(string cChar, string cVarchar, string CBpchar = cBpchar, CText = cText, }; - var actual = await QuerySql.GetPostgresStringTypes(); + var actual = await QuerySql.GetPostgresStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresStringTypesRow x, QuerySql.GetPostgresStringTypesRow y) { @@ -440,9 +440,9 @@ void AssertSingularEquals(QuerySql.GetPostgresStringTypesRow x, QuerySql.GetPost [Test] [TestCase(true, 35, -23423, 4235235263L)] [TestCase(null, null, null, null)] - public async Task TestPostgresIntegerTypes(bool cBoolean, short cSmallint, int cInteger, long cBigint) + public async Task TestPostgresIntegerTypesAsync(bool cBoolean, short cSmallint, int cInteger, long cBigint) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }); var expected = new QuerySql.GetPostgresNumericTypesRow { CBoolean = cBoolean, @@ -450,7 +450,7 @@ public async Task TestPostgresIntegerTypes(bool cBoolean, short cSmallint, int c CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetPostgresNumericTypes(); + var actual = await QuerySql.GetPostgresNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPostgresNumericTypesRow y) { @@ -464,9 +464,9 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPos [Test] [TestCase(3.83f, 4.5534, 998.432, -8403284.321435, 42332.53)] [TestCase(null, null, null, null, null)] - public async Task TestPostgresFloatingPointTypes(float? cReal, decimal? cNumeric, decimal? cDecimal, double? cDoublePrecision, decimal? cMoney) + public async Task TestPostgresFloatingPointTypesAsync(float? cReal, decimal? cNumeric, decimal? cDecimal, double? cDoublePrecision, decimal? cMoney) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CReal = cReal, CNumeric = cNumeric, CDecimal = cDecimal, CDoublePrecision = cDoublePrecision, CMoney = cMoney }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CReal = cReal, CNumeric = cNumeric, CDecimal = cDecimal, CDoublePrecision = cDoublePrecision, CMoney = cMoney }); var expected = new QuerySql.GetPostgresNumericTypesRow { CReal = cReal, @@ -475,7 +475,7 @@ public async Task TestPostgresFloatingPointTypes(float? cReal, decimal? cNumeric CDoublePrecision = cDoublePrecision, CMoney = cMoney }; - var actual = await QuerySql.GetPostgresNumericTypes(); + var actual = await QuerySql.GetPostgresNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPostgresNumericTypesRow y) { @@ -498,9 +498,9 @@ private static IEnumerable PostgresDateTimeTypesTestCases [Test] [TestCaseSource(nameof(PostgresDateTimeTypesTestCases))] - public async Task TestPostgresDateTimeTypes(DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval, Instant? cTimestampNodaInstantOverride) + public async Task TestPostgresDateTimeTypesAsync(DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval, Instant? cTimestampNodaInstantOverride) { - await QuerySql.InsertPostgresDateTimeTypes(new QuerySql.InsertPostgresDateTimeTypesArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTz, CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); + await QuerySql.InsertPostgresDateTimeTypesAsync(new QuerySql.InsertPostgresDateTimeTypesArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTz, CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); var expected = new QuerySql.GetPostgresDateTimeTypesRow { CDate = cDate, @@ -510,7 +510,7 @@ public async Task TestPostgresDateTimeTypes(DateTime? cDate, TimeSpan? cTime, Da CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }; - var actual = await QuerySql.GetPostgresDateTimeTypes(); + var actual = await QuerySql.GetPostgresDateTimeTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresDateTimeTypesRow x, QuerySql.GetPostgresDateTimeTypesRow y) { @@ -535,9 +535,9 @@ private static IEnumerable PostgresArrayTypesTestCases [Test] [TestCaseSource(nameof(PostgresArrayTypesTestCases))] - public async Task TestPostgresArrayTypes(byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cDateArray, DateTime[] cTimestampArray) + public async Task TestPostgresArrayTypesAsync(byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cDateArray, DateTime[] cTimestampArray) { - await QuerySql.InsertPostgresArrayTypes(new QuerySql.InsertPostgresArrayTypesArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CDateArray = cDateArray, CTimestampArray = cTimestampArray }); + await QuerySql.InsertPostgresArrayTypesAsync(new QuerySql.InsertPostgresArrayTypesArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CDateArray = cDateArray, CTimestampArray = cTimestampArray }); var expected = new QuerySql.GetPostgresArrayTypesRow { CBytea = cBytea, @@ -548,7 +548,7 @@ public async Task TestPostgresArrayTypes(byte[] cBytea, bool[] cBooleanArray, st CDateArray = cDateArray, CTimestampArray = cTimestampArray }; - var actual = await QuerySql.GetPostgresArrayTypes(); + var actual = await QuerySql.GetPostgresArrayTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresArrayTypesRow x, QuerySql.GetPostgresArrayTypesRow y) { @@ -573,14 +573,14 @@ private static IEnumerable PostgresGuidDataTypesTestCases [Test] [TestCaseSource(nameof(PostgresGuidDataTypesTestCases))] - public async Task TestPostgresGuidDataTypes(Guid? cUuid) + public async Task TestPostgresGuidDataTypesAsync(Guid? cUuid) { - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CUuid = cUuid }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CUuid = cUuid }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CUuid = cUuid }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -590,10 +590,10 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [Test] [Obsolete] // due to NpgsqlTsVector.Parse usage - public async Task TestPostgresFullTextSearchDataTypes() + public async Task TestPostgresFullTextSearchDataTypesAsync() { - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CText = "Hello world" }); - var actual = await QuerySql.GetPostgresStringTypesTextSearch(new QuerySql.GetPostgresStringTypesTextSearchArgs { ToTsquery = "Hello" }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CText = "Hello world" }); + var actual = await QuerySql.GetPostgresStringTypesTextSearchAsync(new QuerySql.GetPostgresStringTypesTextSearchArgs { ToTsquery = "Hello" }); var expected = new QuerySql.GetPostgresStringTypesTextSearchRow { CText = "Hello world", @@ -622,9 +622,9 @@ private static IEnumerable PostgresNetworkDataTypesTestCases [Test] [TestCaseSource(nameof(PostgresNetworkDataTypesTestCases))] - public async Task TestPostgresNetworkDataTypes(NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr, string cMacaddr8) + public async Task TestPostgresNetworkDataTypesAsync(NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr, string cMacaddr8) { - await QuerySql.InsertPostgresNetworkTypes(new QuerySql.InsertPostgresNetworkTypesArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }); + await QuerySql.InsertPostgresNetworkTypesAsync(new QuerySql.InsertPostgresNetworkTypesArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }); var expected = new QuerySql.GetPostgresNetworkTypesRow { CCidr = cCidr, @@ -632,7 +632,7 @@ public async Task TestPostgresNetworkDataTypes(NpgsqlCidr? cCidr, IPAddress cIne CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }; - var actual = await QuerySql.GetPostgresNetworkTypes(); + var actual = await QuerySql.GetPostgresNetworkTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNetworkTypesRow x, QuerySql.GetPostgresNetworkTypesRow y) { @@ -654,9 +654,9 @@ private static IEnumerable PostgresGeoTypesTestCases [Test] [TestCaseSource(nameof(PostgresGeoTypesTestCases))] - public async Task TestPostgresGeoTypes(NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) + public async Task TestPostgresGeoTypesAsync(NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) { - await QuerySql.InsertPostgresGeoTypes(new QuerySql.InsertPostgresGeoTypesArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }); + await QuerySql.InsertPostgresGeoTypesAsync(new QuerySql.InsertPostgresGeoTypesArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }); var expected = new QuerySql.GetPostgresGeoTypesRow { CPoint = cPoint, @@ -667,7 +667,7 @@ public async Task TestPostgresGeoTypes(NpgsqlPoint? cPoint, NpgsqlLine? cLine, N CPolygon = cPolygon, CCircle = cCircle }; - var actual = await QuerySql.GetPostgresGeoTypes(); + var actual = await QuerySql.GetPostgresGeoTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgresGeoTypesRow y) { @@ -684,12 +684,12 @@ void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgre [Test] [TestCase("{\"name\": \"Swordfishtrombones\", \"year\" :1983}", "$.\"name\"")] [TestCase(null, null)] - public async Task TestPostgresJsonDataTypes(string cJson, string cJsonpath) + public async Task TestPostgresJsonDataTypesAsync(string cJson, string cJsonpath) { JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJson = cParsedJson, CJsonb = cParsedJson, CJsonStringOverride = cJson, CJsonpath = cJsonpath }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJson = cParsedJson, CJsonb = cParsedJson, CJsonStringOverride = cJson, CJsonpath = cJsonpath }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CJson = cParsedJson, @@ -697,7 +697,7 @@ public async Task TestPostgresJsonDataTypes(string cJson, string cJsonpath) CJsonStringOverride = cJson, CJsonpath = cJsonpath }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -722,7 +722,7 @@ void AssertJsonElementEquals(JsonElement? x, JsonElement? y) [Test] [TestCase("Good morning xml, the world says hello")] [TestCase(null)] - public async Task TestPostgresXmlDataTypes(string cXml) + public async Task TestPostgresXmlDataTypesAsync(string cXml) { XmlDocument parsedXml = null; if (cXml != null) @@ -731,12 +731,12 @@ public async Task TestPostgresXmlDataTypes(string cXml) parsedXml.LoadXml(cXml); } - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CXml = parsedXml }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CXml = parsedXml }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CXml = parsedXml }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -751,14 +751,14 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [TestCase(CEnum.Medium)] [TestCase(CEnum.Big)] [TestCase(null)] - public async Task TestPostgresEnumTypes(CEnum? cEnum) + public async Task TestPostgresEnumTypesAsync(CEnum? cEnum) { - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CEnum = cEnum }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CEnum = cEnum }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CEnum = cEnum }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -768,14 +768,14 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [Test] [TestCase(CEnum.Small)] - public async Task TestPostgresNotNullTypes(CEnum cEnumNotNull) + public async Task TestPostgresNotNullTypesAsync(CEnum cEnumNotNull) { - await QuerySql.InsertPostgresNotNullTypes(new QuerySql.InsertPostgresNotNullTypesArgs { CEnumNotNull = cEnumNotNull }); + await QuerySql.InsertPostgresNotNullTypesAsync(new QuerySql.InsertPostgresNotNullTypesArgs { CEnumNotNull = cEnumNotNull }); var expected = new QuerySql.GetPostgresNotNullTypesRow { CEnumNotNull = cEnumNotNull }; - var actual = await QuerySql.GetPostgresNotNullTypes(); + var actual = await QuerySql.GetPostgresNotNullTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNotNullTypesRow x, QuerySql.GetPostgresNotNullTypesRow y) { @@ -786,10 +786,10 @@ void AssertSingularEquals(QuerySql.GetPostgresNotNullTypesRow x, QuerySql.GetPos [Test] [TestCase(100, "z", "Sex Pistols", "Anarchy in the U.K", "Yoshimi Battles the Pink Robots", "Never Mind the Bollocks...")] [TestCase(10, null, null, null, null, null)] - public async Task TestStringCopyFrom(int batchSize, string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) + public async Task TestStringCopyFromAsync(int batchSize, string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresStringTypesBatchArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText }).ToList(); - await QuerySql.InsertPostgresStringTypesBatch(batchArgs); + await QuerySql.InsertPostgresStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresStringTypesCntRow { Cnt = batchSize, @@ -799,7 +799,7 @@ public async Task TestStringCopyFrom(int batchSize, string cChar, string cVarcha CBpchar = cBpchar, CText = cText }; - var actual = await QuerySql.GetPostgresStringTypesCnt(); + var actual = await QuerySql.GetPostgresStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresStringTypesCntRow x, QuerySql.GetPostgresStringTypesCntRow y) { @@ -815,10 +815,10 @@ void AssertSingularEquals(QuerySql.GetPostgresStringTypesCntRow x, QuerySql.GetP [Test] [TestCase(100, true, 3, 453, -1445214231L)] [TestCase(10, null, null, null, null)] - public async Task TestIntegerCopyFrom(int batchSize, bool? cBoolean, short? cSmallint, int? cInteger, long? cBigint) + public async Task TestIntegerCopyFromAsync(int batchSize, bool? cBoolean, short? cSmallint, int? cInteger, long? cBigint) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNumericTypesBatchArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }).ToList(); - await QuerySql.InsertPostgresNumericTypesBatch(batchArgs); + await QuerySql.InsertPostgresNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNumericTypesCntRow { Cnt = batchSize, @@ -827,7 +827,7 @@ public async Task TestIntegerCopyFrom(int batchSize, bool? cBoolean, short? cSma CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetPostgresNumericTypesCnt(); + var actual = await QuerySql.GetPostgresNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.GetPostgresNumericTypesCntRow y) { @@ -842,10 +842,10 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.Get [Test] [TestCase(100, 666.6f, 336.3431, -99.999, -1377.996, -43242.43)] [TestCase(10, null, null, null, null, null)] - public async Task TestFloatingPointCopyFrom(int batchSize, float? cReal, decimal? cDecimal, decimal? cNumeric, double? cDoublePrecision, decimal? cMoney) + public async Task TestFloatingPointCopyFromAsync(int batchSize, float? cReal, decimal? cDecimal, decimal? cNumeric, double? cDoublePrecision, decimal? cMoney) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNumericTypesBatchArgs { CReal = cReal, CDecimal = cDecimal, CNumeric = cNumeric, CDoublePrecision = cDoublePrecision, CMoney = cMoney }).ToList(); - await QuerySql.InsertPostgresNumericTypesBatch(batchArgs); + await QuerySql.InsertPostgresNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNumericTypesCntRow { Cnt = batchSize, @@ -855,7 +855,7 @@ public async Task TestFloatingPointCopyFrom(int batchSize, float? cReal, decimal CDoublePrecision = cDoublePrecision, CMoney = cMoney }; - var actual = await QuerySql.GetPostgresNumericTypesCnt(); + var actual = await QuerySql.GetPostgresNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.GetPostgresNumericTypesCntRow y) { @@ -871,13 +871,13 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.Get [Test] [TestCase(100, "1973-12-3", "00:34:00", "1960-11-3 02:01:22", "2030-07-20 15:44:01+09:00", "02:03:04")] [TestCase(10, null, null, null, null, null)] - public async Task TestDateTimeCopyFrom(int batchSize, DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval) + public async Task TestDateTimeCopyFromAsync(int batchSize, DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval) { DateTime? cTimestampWithTzAsUtc = null; if (cTimestampWithTz != null) cTimestampWithTzAsUtc = DateTime.SpecifyKind(cTimestampWithTz.Value, DateTimeKind.Utc); var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresDateTimeTypesBatchArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTzAsUtc, CInterval = cInterval }).ToList(); - await QuerySql.InsertPostgresDateTimeTypesBatch(batchArgs); + await QuerySql.InsertPostgresDateTimeTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresDateTimeTypesCntRow { Cnt = batchSize, @@ -887,7 +887,7 @@ public async Task TestDateTimeCopyFrom(int batchSize, DateTime? cDate, TimeSpan? CTimestampWithTz = cTimestampWithTz, CInterval = cInterval }; - var actual = await QuerySql.GetPostgresDateTimeTypesCnt(); + var actual = await QuerySql.GetPostgresDateTimeTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresDateTimeTypesCntRow x, QuerySql.GetPostgresDateTimeTypesCntRow y) { @@ -911,16 +911,16 @@ private static IEnumerable PostgresGuidCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresGuidCopyFromTestCases))] - public async Task TestPostgresGuidCopyFrom(int batchSize, Guid? cUuid) + public async Task TestPostgresGuidCopyFromAsync(int batchSize, Guid? cUuid) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresSpecialTypesBatchArgs { CUuid = cUuid }).ToList(); - await QuerySql.InsertPostgresSpecialTypesBatch(batchArgs); + await QuerySql.InsertPostgresSpecialTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresSpecialTypesCntRow { Cnt = batchSize, CUuid = cUuid }; - var actual = await QuerySql.GetPostgresSpecialTypesCnt(); + var actual = await QuerySql.GetPostgresSpecialTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.GetPostgresSpecialTypesCntRow y) { @@ -932,20 +932,20 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.Get [Test] [TestCase(100, "{\"song\": \"Pinball Wizard\", \"album\": \"Tommy\", \"artist\": \"The Who\"}")] [TestCase(10, null)] - public async Task TestPostgresJsonCopyFrom(int batchSize, string cJson) + public async Task TestPostgresJsonCopyFromAsync(int batchSize, string cJson) { JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresSpecialTypesBatchArgs { CJson = cParsedJson, CJsonb = cParsedJson }).ToList(); - await QuerySql.InsertPostgresSpecialTypesBatch(batchArgs); + await QuerySql.InsertPostgresSpecialTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresSpecialTypesCntRow { Cnt = batchSize, CJson = cParsedJson, CJsonb = cParsedJson }; - var actual = await QuerySql.GetPostgresSpecialTypesCnt(); + var actual = await QuerySql.GetPostgresSpecialTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.GetPostgresSpecialTypesCntRow y) { @@ -977,10 +977,10 @@ private static IEnumerable PostgresNetworkCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresNetworkCopyFromTestCases))] - public async Task TestPostgresNetworkCopyFrom(int batchSize, NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr) + public async Task TestPostgresNetworkCopyFromAsync(int batchSize, NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNetworkTypesBatchArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr }).ToList(); - await QuerySql.InsertPostgresNetworkTypesBatch(batchArgs); + await QuerySql.InsertPostgresNetworkTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNetworkTypesCntRow { Cnt = batchSize, @@ -988,7 +988,7 @@ public async Task TestPostgresNetworkCopyFrom(int batchSize, NpgsqlCidr? cCidr, CInet = cInet, CMacaddr = cMacaddr }; - var actual = await QuerySql.GetPostgresNetworkTypesCnt(); + var actual = await QuerySql.GetPostgresNetworkTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNetworkTypesCntRow x, QuerySql.GetPostgresNetworkTypesCntRow y) { @@ -1011,10 +1011,10 @@ private static IEnumerable PostgresArrayCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresArrayCopyFromTestCases))] - public async Task TestArrayCopyFrom(int batchSize, byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cTimestampArray) + public async Task TestArrayCopyFromAsync(int batchSize, byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cTimestampArray) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresArrayTypesBatchArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CTimestampArray = cTimestampArray }).ToList(); - await QuerySql.InsertPostgresArrayTypesBatch(batchArgs); + await QuerySql.InsertPostgresArrayTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresArrayTypesCntRow { Cnt = batchSize, @@ -1025,7 +1025,7 @@ public async Task TestArrayCopyFrom(int batchSize, byte[] cBytea, bool[] cBoolea CDecimalArray = cDecimalArray, CTimestampArray = cTimestampArray }; - var actual = await QuerySql.GetPostgresArrayTypesCnt(); + var actual = await QuerySql.GetPostgresArrayTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresArrayTypesCntRow x, QuerySql.GetPostgresArrayTypesCntRow y) { @@ -1050,10 +1050,10 @@ private static IEnumerable PostgresGeoCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresGeoCopyFromTestCases))] - public async Task TestPostgresGeoCopyFrom(int batchSize, NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) + public async Task TestPostgresGeoCopyFromAsync(int batchSize, NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresGeoTypesBatchArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }).ToList(); - await QuerySql.InsertPostgresGeoTypesBatch(batchArgs); + await QuerySql.InsertPostgresGeoTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresGeoTypesRow { CPoint = cPoint, @@ -1064,7 +1064,7 @@ public async Task TestPostgresGeoCopyFrom(int batchSize, NpgsqlPoint? cPoint, Np CPolygon = cPolygon, CCircle = cCircle }; - var actual = await QuerySql.GetPostgresGeoTypes(); + var actual = await QuerySql.GetPostgresGeoTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgresGeoTypesRow y) { diff --git a/end2end/EndToEndTestsLegacy/NpgsqlTester.cs b/end2end/EndToEndTestsLegacy/NpgsqlTester.cs index 94ffb27c..acbf2672 100644 --- a/end2end/EndToEndTestsLegacy/NpgsqlTester.cs +++ b/end2end/EndToEndTestsLegacy/NpgsqlTester.cs @@ -13,14 +13,14 @@ public partial class NpgsqlTester [TearDown] public async Task EmptyTestsTable() { - await QuerySql.TruncateAuthors(); - await QuerySql.TruncatePostgresNumericTypes(); - await QuerySql.TruncatePostgresStringTypes(); - await QuerySql.TruncatePostgresDateTimeTypes(); - await QuerySql.TruncatePostgresGeoTypes(); - await QuerySql.TruncatePostgresNetworkTypes(); - await QuerySql.TruncatePostgresArrayTypes(); - await QuerySql.TruncatePostgresSpecialTypes(); + await QuerySql.TruncateAuthorsAsync(); + await QuerySql.TruncatePostgresNumericTypesAsync(); + await QuerySql.TruncatePostgresStringTypesAsync(); + await QuerySql.TruncatePostgresDateTimeTypesAsync(); + await QuerySql.TruncatePostgresGeoTypesAsync(); + await QuerySql.TruncatePostgresNetworkTypesAsync(); + await QuerySql.TruncatePostgresArrayTypesAsync(); + await QuerySql.TruncatePostgresSpecialTypesAsync(); } } } \ No newline at end of file diff --git a/end2end/EndToEndTestsLegacy/NpgsqlTester.generated.cs b/end2end/EndToEndTestsLegacy/NpgsqlTester.generated.cs index 8fc2f9b2..b5d1d412 100644 --- a/end2end/EndToEndTestsLegacy/NpgsqlTester.generated.cs +++ b/end2end/EndToEndTestsLegacy/NpgsqlTester.generated.cs @@ -18,17 +18,17 @@ namespace EndToEndTests public partial class NpgsqlTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -39,10 +39,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -58,7 +58,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -76,21 +76,21 @@ void AssertSequenceEquals(List x, List { @@ -107,7 +107,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -125,16 +125,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -167,7 +167,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -188,12 +188,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -227,7 +227,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -248,10 +248,10 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -267,7 +267,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -285,10 +285,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -298,7 +298,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -316,14 +316,14 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestPostgresTransaction() + public async Task TestPostgresTransactionAsync() { var connection = new Npgsql.NpgsqlConnection(Environment.GetEnvironmentVariable(EndToEndCommon.PostgresConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); await transaction.CommitAsync(); var expected = new QuerySql.GetAuthorRow @@ -332,7 +332,7 @@ public async Task TestPostgresTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -343,52 +343,52 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestPostgresTransactionRollback() + public async Task TestPostgresTransactionRollbackAsync() { var connection = new Npgsql.NpgsqlConnection(Environment.GetEnvironmentVariable(EndToEndCommon.PostgresConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var sqlQueryWithTx = QuerySql.WithTransaction(transaction); - await sqlQueryWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await sqlQueryWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); await transaction.RollbackAsync(); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } [Test] - public async Task TestArray() + public async Task TestArrayAsync() { - var id1 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); - var bojackId = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthorsByIds(new QuerySql.GetAuthorsByIdsArgs { LongArr1 = new[] { id1, bojackId } }); + var id1 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); + var bojackId = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorsByIdsAsync(new QuerySql.GetAuthorsByIdsArgs { LongArr1 = new[] { id1, bojackId } }); ClassicAssert.AreEqual(2, actual.Count); } [Test] - public async Task TestMultipleArrays() + public async Task TestMultipleArraysAsync() { - var id1 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); - var id2 = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Only 2 things are infinite, the universe and human stupidity" }); - var bojackId = await this.QuerySql.CreateAuthorReturnId(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthorsByIdsAndNames(new QuerySql.GetAuthorsByIdsAndNamesArgs { LongArr1 = new[] { id1, bojackId }, StringArr2 = new[] { "Albert Einstein" } }); + var id1 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Quote that everyone always attribute to Einstein" }); + var id2 = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Albert Einstein", Bio = "Only 2 things are infinite, the universe and human stupidity" }); + var bojackId = await this.QuerySql.CreateAuthorReturnIdAsync(new QuerySql.CreateAuthorReturnIdArgs { Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorsByIdsAndNamesAsync(new QuerySql.GetAuthorsByIdsAndNamesArgs { LongArr1 = new[] { id1, bojackId }, StringArr2 = new[] { "Albert Einstein" } }); ClassicAssert.AreEqual(1, actual.Count); } [Test] [TestCase(-54355, "White Light from the Mouth of Infinity", "2022-10-2 15:44:01+09:00")] [TestCase(null, null, "1970-01-01 00:00:00")] - public async Task TestPostgresDataTypesOverride(int? cInteger, string cVarchar, DateTime cTimestamp) + public async Task TestPostgresDataTypesOverrideAsync(int? cInteger, string cVarchar, DateTime cTimestamp) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CInteger = cInteger }); - await QuerySql.InsertPostgresDateTimeTypes(new QuerySql.InsertPostgresDateTimeTypesArgs { CTimestamp = cTimestamp }); - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CVarchar = cVarchar }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CInteger = cInteger }); + await QuerySql.InsertPostgresDateTimeTypesAsync(new QuerySql.InsertPostgresDateTimeTypesArgs { CTimestamp = cTimestamp }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CVarchar = cVarchar }); var expected = new QuerySql.GetPostgresFunctionsRow { MaxInteger = cInteger, MaxVarchar = cVarchar, MaxTimestamp = cTimestamp }; - var actual = await QuerySql.GetPostgresFunctions(); + var actual = await QuerySql.GetPostgresFunctionsAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresFunctionsRow x, QuerySql.GetPostgresFunctionsRow y) { @@ -401,22 +401,22 @@ void AssertSingularEquals(QuerySql.GetPostgresFunctionsRow x, QuerySql.GetPostgr [Test] public void TestPostgresInvalidJson() { - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonpath = "SOME INVALID JSONPATH" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonStringOverride = "SOME INVALID JSON" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJsonpath = "SOME INVALID JSONPATH" })); } [Test] public void TestPostgresInvalidXml() { - Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CXmlStringOverride = "SOME INVALID XML" })); + Assert.ThrowsAsync(async () => await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CXmlStringOverride = "SOME INVALID XML" })); } [Test] [TestCase("E", "It takes a nation of millions to hold us back", "Rebel Without a Pause", "Master of Puppets", "Prophets of Rage")] [TestCase(null, null, null, null, null)] - public async Task TestPostgresStringTypes(string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) + public async Task TestPostgresStringTypesAsync(string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) { - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText, }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText, }); var expected = new QuerySql.GetPostgresStringTypesRow { CChar = cChar, @@ -425,7 +425,7 @@ public async Task TestPostgresStringTypes(string cChar, string cVarchar, string CBpchar = cBpchar, CText = cText, }; - var actual = await QuerySql.GetPostgresStringTypes(); + var actual = await QuerySql.GetPostgresStringTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresStringTypesRow x, QuerySql.GetPostgresStringTypesRow y) { @@ -440,9 +440,9 @@ void AssertSingularEquals(QuerySql.GetPostgresStringTypesRow x, QuerySql.GetPost [Test] [TestCase(true, 35, -23423, 4235235263L)] [TestCase(null, null, null, null)] - public async Task TestPostgresIntegerTypes(bool cBoolean, short cSmallint, int cInteger, long cBigint) + public async Task TestPostgresIntegerTypesAsync(bool cBoolean, short cSmallint, int cInteger, long cBigint) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }); var expected = new QuerySql.GetPostgresNumericTypesRow { CBoolean = cBoolean, @@ -450,7 +450,7 @@ public async Task TestPostgresIntegerTypes(bool cBoolean, short cSmallint, int c CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetPostgresNumericTypes(); + var actual = await QuerySql.GetPostgresNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPostgresNumericTypesRow y) { @@ -464,9 +464,9 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPos [Test] [TestCase(3.83f, 4.5534, 998.432, -8403284.321435, 42332.53)] [TestCase(null, null, null, null, null)] - public async Task TestPostgresFloatingPointTypes(float? cReal, decimal? cNumeric, decimal? cDecimal, double? cDoublePrecision, decimal? cMoney) + public async Task TestPostgresFloatingPointTypesAsync(float? cReal, decimal? cNumeric, decimal? cDecimal, double? cDoublePrecision, decimal? cMoney) { - await QuerySql.InsertPostgresNumericTypes(new QuerySql.InsertPostgresNumericTypesArgs { CReal = cReal, CNumeric = cNumeric, CDecimal = cDecimal, CDoublePrecision = cDoublePrecision, CMoney = cMoney }); + await QuerySql.InsertPostgresNumericTypesAsync(new QuerySql.InsertPostgresNumericTypesArgs { CReal = cReal, CNumeric = cNumeric, CDecimal = cDecimal, CDoublePrecision = cDoublePrecision, CMoney = cMoney }); var expected = new QuerySql.GetPostgresNumericTypesRow { CReal = cReal, @@ -475,7 +475,7 @@ public async Task TestPostgresFloatingPointTypes(float? cReal, decimal? cNumeric CDoublePrecision = cDoublePrecision, CMoney = cMoney }; - var actual = await QuerySql.GetPostgresNumericTypes(); + var actual = await QuerySql.GetPostgresNumericTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesRow x, QuerySql.GetPostgresNumericTypesRow y) { @@ -498,9 +498,9 @@ private static IEnumerable PostgresDateTimeTypesTestCases [Test] [TestCaseSource(nameof(PostgresDateTimeTypesTestCases))] - public async Task TestPostgresDateTimeTypes(DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval, Instant? cTimestampNodaInstantOverride) + public async Task TestPostgresDateTimeTypesAsync(DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval, Instant? cTimestampNodaInstantOverride) { - await QuerySql.InsertPostgresDateTimeTypes(new QuerySql.InsertPostgresDateTimeTypesArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTz, CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); + await QuerySql.InsertPostgresDateTimeTypesAsync(new QuerySql.InsertPostgresDateTimeTypesArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTz, CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }); var expected = new QuerySql.GetPostgresDateTimeTypesRow { CDate = cDate, @@ -510,7 +510,7 @@ public async Task TestPostgresDateTimeTypes(DateTime? cDate, TimeSpan? cTime, Da CInterval = cInterval, CTimestampNodaInstantOverride = cTimestampNodaInstantOverride }; - var actual = await QuerySql.GetPostgresDateTimeTypes(); + var actual = await QuerySql.GetPostgresDateTimeTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresDateTimeTypesRow x, QuerySql.GetPostgresDateTimeTypesRow y) { @@ -535,9 +535,9 @@ private static IEnumerable PostgresArrayTypesTestCases [Test] [TestCaseSource(nameof(PostgresArrayTypesTestCases))] - public async Task TestPostgresArrayTypes(byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cDateArray, DateTime[] cTimestampArray) + public async Task TestPostgresArrayTypesAsync(byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cDateArray, DateTime[] cTimestampArray) { - await QuerySql.InsertPostgresArrayTypes(new QuerySql.InsertPostgresArrayTypesArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CDateArray = cDateArray, CTimestampArray = cTimestampArray }); + await QuerySql.InsertPostgresArrayTypesAsync(new QuerySql.InsertPostgresArrayTypesArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CDateArray = cDateArray, CTimestampArray = cTimestampArray }); var expected = new QuerySql.GetPostgresArrayTypesRow { CBytea = cBytea, @@ -548,7 +548,7 @@ public async Task TestPostgresArrayTypes(byte[] cBytea, bool[] cBooleanArray, st CDateArray = cDateArray, CTimestampArray = cTimestampArray }; - var actual = await QuerySql.GetPostgresArrayTypes(); + var actual = await QuerySql.GetPostgresArrayTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresArrayTypesRow x, QuerySql.GetPostgresArrayTypesRow y) { @@ -573,14 +573,14 @@ private static IEnumerable PostgresGuidDataTypesTestCases [Test] [TestCaseSource(nameof(PostgresGuidDataTypesTestCases))] - public async Task TestPostgresGuidDataTypes(Guid? cUuid) + public async Task TestPostgresGuidDataTypesAsync(Guid? cUuid) { - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CUuid = cUuid }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CUuid = cUuid }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CUuid = cUuid }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -590,10 +590,10 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [Test] [Obsolete] // due to NpgsqlTsVector.Parse usage - public async Task TestPostgresFullTextSearchDataTypes() + public async Task TestPostgresFullTextSearchDataTypesAsync() { - await QuerySql.InsertPostgresStringTypes(new QuerySql.InsertPostgresStringTypesArgs { CText = "Hello world" }); - var actual = await QuerySql.GetPostgresStringTypesTextSearch(new QuerySql.GetPostgresStringTypesTextSearchArgs { ToTsquery = "Hello" }); + await QuerySql.InsertPostgresStringTypesAsync(new QuerySql.InsertPostgresStringTypesArgs { CText = "Hello world" }); + var actual = await QuerySql.GetPostgresStringTypesTextSearchAsync(new QuerySql.GetPostgresStringTypesTextSearchArgs { ToTsquery = "Hello" }); var expected = new QuerySql.GetPostgresStringTypesTextSearchRow { CText = "Hello world", @@ -622,9 +622,9 @@ private static IEnumerable PostgresNetworkDataTypesTestCases [Test] [TestCaseSource(nameof(PostgresNetworkDataTypesTestCases))] - public async Task TestPostgresNetworkDataTypes(NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr, string cMacaddr8) + public async Task TestPostgresNetworkDataTypesAsync(NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr, string cMacaddr8) { - await QuerySql.InsertPostgresNetworkTypes(new QuerySql.InsertPostgresNetworkTypesArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }); + await QuerySql.InsertPostgresNetworkTypesAsync(new QuerySql.InsertPostgresNetworkTypesArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }); var expected = new QuerySql.GetPostgresNetworkTypesRow { CCidr = cCidr, @@ -632,7 +632,7 @@ public async Task TestPostgresNetworkDataTypes(NpgsqlCidr? cCidr, IPAddress cIne CMacaddr = cMacaddr, CMacaddr8 = cMacaddr8 }; - var actual = await QuerySql.GetPostgresNetworkTypes(); + var actual = await QuerySql.GetPostgresNetworkTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNetworkTypesRow x, QuerySql.GetPostgresNetworkTypesRow y) { @@ -654,9 +654,9 @@ private static IEnumerable PostgresGeoTypesTestCases [Test] [TestCaseSource(nameof(PostgresGeoTypesTestCases))] - public async Task TestPostgresGeoTypes(NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) + public async Task TestPostgresGeoTypesAsync(NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) { - await QuerySql.InsertPostgresGeoTypes(new QuerySql.InsertPostgresGeoTypesArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }); + await QuerySql.InsertPostgresGeoTypesAsync(new QuerySql.InsertPostgresGeoTypesArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }); var expected = new QuerySql.GetPostgresGeoTypesRow { CPoint = cPoint, @@ -667,7 +667,7 @@ public async Task TestPostgresGeoTypes(NpgsqlPoint? cPoint, NpgsqlLine? cLine, N CPolygon = cPolygon, CCircle = cCircle }; - var actual = await QuerySql.GetPostgresGeoTypes(); + var actual = await QuerySql.GetPostgresGeoTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgresGeoTypesRow y) { @@ -684,12 +684,12 @@ void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgre [Test] [TestCase("{\"name\": \"Swordfishtrombones\", \"year\" :1983}", "$.\"name\"")] [TestCase(null, null)] - public async Task TestPostgresJsonDataTypes(string cJson, string cJsonpath) + public async Task TestPostgresJsonDataTypesAsync(string cJson, string cJsonpath) { JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CJson = cParsedJson, CJsonb = cParsedJson, CJsonStringOverride = cJson, CJsonpath = cJsonpath }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CJson = cParsedJson, CJsonb = cParsedJson, CJsonStringOverride = cJson, CJsonpath = cJsonpath }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CJson = cParsedJson, @@ -697,7 +697,7 @@ public async Task TestPostgresJsonDataTypes(string cJson, string cJsonpath) CJsonStringOverride = cJson, CJsonpath = cJsonpath }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -722,7 +722,7 @@ void AssertJsonElementEquals(JsonElement? x, JsonElement? y) [Test] [TestCase("Good morning xml, the world says hello")] [TestCase(null)] - public async Task TestPostgresXmlDataTypes(string cXml) + public async Task TestPostgresXmlDataTypesAsync(string cXml) { XmlDocument parsedXml = null; if (cXml != null) @@ -731,12 +731,12 @@ public async Task TestPostgresXmlDataTypes(string cXml) parsedXml.LoadXml(cXml); } - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CXml = parsedXml }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CXml = parsedXml }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CXml = parsedXml }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -751,14 +751,14 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [TestCase(CEnum.Medium)] [TestCase(CEnum.Big)] [TestCase(null)] - public async Task TestPostgresEnumTypes(CEnum? cEnum) + public async Task TestPostgresEnumTypesAsync(CEnum? cEnum) { - await QuerySql.InsertPostgresSpecialTypes(new QuerySql.InsertPostgresSpecialTypesArgs { CEnum = cEnum }); + await QuerySql.InsertPostgresSpecialTypesAsync(new QuerySql.InsertPostgresSpecialTypesArgs { CEnum = cEnum }); var expected = new QuerySql.GetPostgresSpecialTypesRow { CEnum = cEnum }; - var actual = await QuerySql.GetPostgresSpecialTypes(); + var actual = await QuerySql.GetPostgresSpecialTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPostgresSpecialTypesRow y) { @@ -768,14 +768,14 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesRow x, QuerySql.GetPos [Test] [TestCase(CEnum.Small)] - public async Task TestPostgresNotNullTypes(CEnum cEnumNotNull) + public async Task TestPostgresNotNullTypesAsync(CEnum cEnumNotNull) { - await QuerySql.InsertPostgresNotNullTypes(new QuerySql.InsertPostgresNotNullTypesArgs { CEnumNotNull = cEnumNotNull }); + await QuerySql.InsertPostgresNotNullTypesAsync(new QuerySql.InsertPostgresNotNullTypesArgs { CEnumNotNull = cEnumNotNull }); var expected = new QuerySql.GetPostgresNotNullTypesRow { CEnumNotNull = cEnumNotNull }; - var actual = await QuerySql.GetPostgresNotNullTypes(); + var actual = await QuerySql.GetPostgresNotNullTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNotNullTypesRow x, QuerySql.GetPostgresNotNullTypesRow y) { @@ -786,10 +786,10 @@ void AssertSingularEquals(QuerySql.GetPostgresNotNullTypesRow x, QuerySql.GetPos [Test] [TestCase(100, "z", "Sex Pistols", "Anarchy in the U.K", "Yoshimi Battles the Pink Robots", "Never Mind the Bollocks...")] [TestCase(10, null, null, null, null, null)] - public async Task TestStringCopyFrom(int batchSize, string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) + public async Task TestStringCopyFromAsync(int batchSize, string cChar, string cVarchar, string cCharacterVarying, string cBpchar, string cText) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresStringTypesBatchArgs { CChar = cChar, CVarchar = cVarchar, CCharacterVarying = cCharacterVarying, CBpchar = cBpchar, CText = cText }).ToList(); - await QuerySql.InsertPostgresStringTypesBatch(batchArgs); + await QuerySql.InsertPostgresStringTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresStringTypesCntRow { Cnt = batchSize, @@ -799,7 +799,7 @@ public async Task TestStringCopyFrom(int batchSize, string cChar, string cVarcha CBpchar = cBpchar, CText = cText }; - var actual = await QuerySql.GetPostgresStringTypesCnt(); + var actual = await QuerySql.GetPostgresStringTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresStringTypesCntRow x, QuerySql.GetPostgresStringTypesCntRow y) { @@ -815,10 +815,10 @@ void AssertSingularEquals(QuerySql.GetPostgresStringTypesCntRow x, QuerySql.GetP [Test] [TestCase(100, true, 3, 453, -1445214231L)] [TestCase(10, null, null, null, null)] - public async Task TestIntegerCopyFrom(int batchSize, bool? cBoolean, short? cSmallint, int? cInteger, long? cBigint) + public async Task TestIntegerCopyFromAsync(int batchSize, bool? cBoolean, short? cSmallint, int? cInteger, long? cBigint) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNumericTypesBatchArgs { CBoolean = cBoolean, CSmallint = cSmallint, CInteger = cInteger, CBigint = cBigint }).ToList(); - await QuerySql.InsertPostgresNumericTypesBatch(batchArgs); + await QuerySql.InsertPostgresNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNumericTypesCntRow { Cnt = batchSize, @@ -827,7 +827,7 @@ public async Task TestIntegerCopyFrom(int batchSize, bool? cBoolean, short? cSma CInteger = cInteger, CBigint = cBigint }; - var actual = await QuerySql.GetPostgresNumericTypesCnt(); + var actual = await QuerySql.GetPostgresNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.GetPostgresNumericTypesCntRow y) { @@ -842,10 +842,10 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.Get [Test] [TestCase(100, 666.6f, 336.3431, -99.999, -1377.996, -43242.43)] [TestCase(10, null, null, null, null, null)] - public async Task TestFloatingPointCopyFrom(int batchSize, float? cReal, decimal? cDecimal, decimal? cNumeric, double? cDoublePrecision, decimal? cMoney) + public async Task TestFloatingPointCopyFromAsync(int batchSize, float? cReal, decimal? cDecimal, decimal? cNumeric, double? cDoublePrecision, decimal? cMoney) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNumericTypesBatchArgs { CReal = cReal, CDecimal = cDecimal, CNumeric = cNumeric, CDoublePrecision = cDoublePrecision, CMoney = cMoney }).ToList(); - await QuerySql.InsertPostgresNumericTypesBatch(batchArgs); + await QuerySql.InsertPostgresNumericTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNumericTypesCntRow { Cnt = batchSize, @@ -855,7 +855,7 @@ public async Task TestFloatingPointCopyFrom(int batchSize, float? cReal, decimal CDoublePrecision = cDoublePrecision, CMoney = cMoney }; - var actual = await QuerySql.GetPostgresNumericTypesCnt(); + var actual = await QuerySql.GetPostgresNumericTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.GetPostgresNumericTypesCntRow y) { @@ -871,13 +871,13 @@ void AssertSingularEquals(QuerySql.GetPostgresNumericTypesCntRow x, QuerySql.Get [Test] [TestCase(100, "1973-12-3", "00:34:00", "1960-11-3 02:01:22", "2030-07-20 15:44:01+09:00", "02:03:04")] [TestCase(10, null, null, null, null, null)] - public async Task TestDateTimeCopyFrom(int batchSize, DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval) + public async Task TestDateTimeCopyFromAsync(int batchSize, DateTime? cDate, TimeSpan? cTime, DateTime? cTimestamp, DateTime? cTimestampWithTz, TimeSpan? cInterval) { DateTime? cTimestampWithTzAsUtc = null; if (cTimestampWithTz != null) cTimestampWithTzAsUtc = DateTime.SpecifyKind(cTimestampWithTz.Value, DateTimeKind.Utc); var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresDateTimeTypesBatchArgs { CDate = cDate, CTime = cTime, CTimestamp = cTimestamp, CTimestampWithTz = cTimestampWithTzAsUtc, CInterval = cInterval }).ToList(); - await QuerySql.InsertPostgresDateTimeTypesBatch(batchArgs); + await QuerySql.InsertPostgresDateTimeTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresDateTimeTypesCntRow { Cnt = batchSize, @@ -887,7 +887,7 @@ public async Task TestDateTimeCopyFrom(int batchSize, DateTime? cDate, TimeSpan? CTimestampWithTz = cTimestampWithTz, CInterval = cInterval }; - var actual = await QuerySql.GetPostgresDateTimeTypesCnt(); + var actual = await QuerySql.GetPostgresDateTimeTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresDateTimeTypesCntRow x, QuerySql.GetPostgresDateTimeTypesCntRow y) { @@ -911,16 +911,16 @@ private static IEnumerable PostgresGuidCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresGuidCopyFromTestCases))] - public async Task TestPostgresGuidCopyFrom(int batchSize, Guid? cUuid) + public async Task TestPostgresGuidCopyFromAsync(int batchSize, Guid? cUuid) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresSpecialTypesBatchArgs { CUuid = cUuid }).ToList(); - await QuerySql.InsertPostgresSpecialTypesBatch(batchArgs); + await QuerySql.InsertPostgresSpecialTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresSpecialTypesCntRow { Cnt = batchSize, CUuid = cUuid }; - var actual = await QuerySql.GetPostgresSpecialTypesCnt(); + var actual = await QuerySql.GetPostgresSpecialTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.GetPostgresSpecialTypesCntRow y) { @@ -932,20 +932,20 @@ void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.Get [Test] [TestCase(100, "{\"song\": \"Pinball Wizard\", \"album\": \"Tommy\", \"artist\": \"The Who\"}")] [TestCase(10, null)] - public async Task TestPostgresJsonCopyFrom(int batchSize, string cJson) + public async Task TestPostgresJsonCopyFromAsync(int batchSize, string cJson) { JsonElement? cParsedJson = null; if (cJson != null) cParsedJson = JsonDocument.Parse(cJson).RootElement; var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresSpecialTypesBatchArgs { CJson = cParsedJson, CJsonb = cParsedJson }).ToList(); - await QuerySql.InsertPostgresSpecialTypesBatch(batchArgs); + await QuerySql.InsertPostgresSpecialTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresSpecialTypesCntRow { Cnt = batchSize, CJson = cParsedJson, CJsonb = cParsedJson }; - var actual = await QuerySql.GetPostgresSpecialTypesCnt(); + var actual = await QuerySql.GetPostgresSpecialTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresSpecialTypesCntRow x, QuerySql.GetPostgresSpecialTypesCntRow y) { @@ -977,10 +977,10 @@ private static IEnumerable PostgresNetworkCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresNetworkCopyFromTestCases))] - public async Task TestPostgresNetworkCopyFrom(int batchSize, NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr) + public async Task TestPostgresNetworkCopyFromAsync(int batchSize, NpgsqlCidr? cCidr, IPAddress cInet, PhysicalAddress cMacaddr) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresNetworkTypesBatchArgs { CCidr = cCidr, CInet = cInet, CMacaddr = cMacaddr }).ToList(); - await QuerySql.InsertPostgresNetworkTypesBatch(batchArgs); + await QuerySql.InsertPostgresNetworkTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresNetworkTypesCntRow { Cnt = batchSize, @@ -988,7 +988,7 @@ public async Task TestPostgresNetworkCopyFrom(int batchSize, NpgsqlCidr? cCidr, CInet = cInet, CMacaddr = cMacaddr }; - var actual = await QuerySql.GetPostgresNetworkTypesCnt(); + var actual = await QuerySql.GetPostgresNetworkTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresNetworkTypesCntRow x, QuerySql.GetPostgresNetworkTypesCntRow y) { @@ -1011,10 +1011,10 @@ private static IEnumerable PostgresArrayCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresArrayCopyFromTestCases))] - public async Task TestArrayCopyFrom(int batchSize, byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cTimestampArray) + public async Task TestArrayCopyFromAsync(int batchSize, byte[] cBytea, bool[] cBooleanArray, string[] cTextArray, int[] cIntegerArray, decimal[] cDecimalArray, DateTime[] cTimestampArray) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresArrayTypesBatchArgs { CBytea = cBytea, CBooleanArray = cBooleanArray, CTextArray = cTextArray, CIntegerArray = cIntegerArray, CDecimalArray = cDecimalArray, CTimestampArray = cTimestampArray }).ToList(); - await QuerySql.InsertPostgresArrayTypesBatch(batchArgs); + await QuerySql.InsertPostgresArrayTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresArrayTypesCntRow { Cnt = batchSize, @@ -1025,7 +1025,7 @@ public async Task TestArrayCopyFrom(int batchSize, byte[] cBytea, bool[] cBoolea CDecimalArray = cDecimalArray, CTimestampArray = cTimestampArray }; - var actual = await QuerySql.GetPostgresArrayTypesCnt(); + var actual = await QuerySql.GetPostgresArrayTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresArrayTypesCntRow x, QuerySql.GetPostgresArrayTypesCntRow y) { @@ -1050,10 +1050,10 @@ private static IEnumerable PostgresGeoCopyFromTestCases [Test] [TestCaseSource(nameof(PostgresGeoCopyFromTestCases))] - public async Task TestPostgresGeoCopyFrom(int batchSize, NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) + public async Task TestPostgresGeoCopyFromAsync(int batchSize, NpgsqlPoint? cPoint, NpgsqlLine? cLine, NpgsqlLSeg? cLSeg, NpgsqlBox? cBox, NpgsqlPath? cPath, NpgsqlPolygon? cPolygon, NpgsqlCircle? cCircle) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertPostgresGeoTypesBatchArgs { CPoint = cPoint, CLine = cLine, CLseg = cLSeg, CBox = cBox, CPath = cPath, CPolygon = cPolygon, CCircle = cCircle }).ToList(); - await QuerySql.InsertPostgresGeoTypesBatch(batchArgs); + await QuerySql.InsertPostgresGeoTypesBatchAsync(batchArgs); var expected = new QuerySql.GetPostgresGeoTypesRow { CPoint = cPoint, @@ -1064,7 +1064,7 @@ public async Task TestPostgresGeoCopyFrom(int batchSize, NpgsqlPoint? cPoint, Np CPolygon = cPolygon, CCircle = cCircle }; - var actual = await QuerySql.GetPostgresGeoTypes(); + var actual = await QuerySql.GetPostgresGeoTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetPostgresGeoTypesRow x, QuerySql.GetPostgresGeoTypesRow y) { diff --git a/end2end/EndToEndTestsLegacy/SqliteDapperTester.cs b/end2end/EndToEndTestsLegacy/SqliteDapperTester.cs index 00412ed5..ffe5d143 100644 --- a/end2end/EndToEndTestsLegacy/SqliteDapperTester.cs +++ b/end2end/EndToEndTestsLegacy/SqliteDapperTester.cs @@ -13,8 +13,8 @@ public partial class SqliteDapperTester [TearDown] public async Task EmptyTestsTable() { - await QuerySql.DeleteAllAuthors(); - await QuerySql.DeleteAllSqliteTypes(); + await QuerySql.DeleteAllAuthorsAsync(); + await QuerySql.DeleteAllSqliteTypesAsync(); } } } \ No newline at end of file diff --git a/end2end/EndToEndTestsLegacy/SqliteDapperTester.generated.cs b/end2end/EndToEndTestsLegacy/SqliteDapperTester.generated.cs index 7e8720a4..18217b42 100644 --- a/end2end/EndToEndTestsLegacy/SqliteDapperTester.generated.cs +++ b/end2end/EndToEndTestsLegacy/SqliteDapperTester.generated.cs @@ -13,17 +13,17 @@ namespace EndToEndTests public partial class SqliteDapperTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -34,10 +34,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -53,7 +53,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -71,21 +71,21 @@ void AssertSequenceEquals(List x, List { @@ -102,7 +102,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -120,16 +120,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -162,7 +162,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -183,12 +183,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -222,7 +222,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -243,28 +243,28 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -280,7 +280,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -298,10 +298,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -311,7 +311,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -340,9 +340,9 @@ private static IEnumerable SqliteTypesTestCases [Test] [TestCaseSource(nameof(SqliteTypesTestCases))] - public async Task TestSqliteTypes(int? cInteger, decimal? cReal, string cText, byte[] cBlob, bool? cTextBoolOverride, bool? cIntegerBoolOverride, DateTime? cTextDatetimeOverride, DateTime? cIntegerDatetimeOverride, Instant? cTextNodaInstantOverride, Instant? cIntegerNodaInstantOverride) + public async Task TestSqliteTypesAsync(int? cInteger, decimal? cReal, string cText, byte[] cBlob, bool? cTextBoolOverride, bool? cIntegerBoolOverride, DateTime? cTextDatetimeOverride, DateTime? cIntegerDatetimeOverride, Instant? cTextNodaInstantOverride, Instant? cIntegerNodaInstantOverride) { - await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText, CBlob = cBlob, CTextBoolOverride = cTextBoolOverride, CIntegerBoolOverride = cIntegerBoolOverride, CTextDatetimeOverride = cTextDatetimeOverride, CIntegerDatetimeOverride = cIntegerDatetimeOverride, CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }); + await QuerySql.InsertSqliteTypesAsync(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText, CBlob = cBlob, CTextBoolOverride = cTextBoolOverride, CIntegerBoolOverride = cIntegerBoolOverride, CTextDatetimeOverride = cTextDatetimeOverride, CIntegerDatetimeOverride = cIntegerDatetimeOverride, CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }); var expected = new QuerySql.GetSqliteTypesRow { CInteger = cInteger, @@ -356,7 +356,7 @@ public async Task TestSqliteTypes(int? cInteger, decimal? cReal, string cText, b CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }; - var actual = await QuerySql.GetSqliteTypes(); + var actual = await QuerySql.GetSqliteTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetSqliteTypesRow x, QuerySql.GetSqliteTypesRow y) { @@ -374,16 +374,16 @@ void AssertSingularEquals(QuerySql.GetSqliteTypesRow x, QuerySql.GetSqliteTypesR } [Test] - public async Task TestGetAuthorByIdWithMultipleNamedParam() + public async Task TestGetAuthorByIdWithMultipleNamedParamAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); var expected = new QuerySql.GetAuthorByIdWithMultipleNamedParamRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthorByIdWithMultipleNamedParam(new QuerySql.GetAuthorByIdWithMultipleNamedParamArgs { IdArg = 1111, Take = 1 }); + var actual = await this.QuerySql.GetAuthorByIdWithMultipleNamedParamAsync(new QuerySql.GetAuthorByIdWithMultipleNamedParamArgs { IdArg = 1111, Take = 1 }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorByIdWithMultipleNamedParamRow x, QuerySql.GetAuthorByIdWithMultipleNamedParamRow y) { @@ -396,16 +396,16 @@ void AssertSingularEquals(QuerySql.GetAuthorByIdWithMultipleNamedParamRow x, Que [Test] [TestCase(-54355, 9787.66, "Have One On Me")] [TestCase(null, 0.0, null)] - public async Task TestSqliteDataTypesOverride(int? cInteger, decimal cReal, string cText) + public async Task TestSqliteDataTypesOverrideAsync(int? cInteger, decimal cReal, string cText) { - await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText }); + await QuerySql.InsertSqliteTypesAsync(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText }); var expected = new QuerySql.GetSqliteFunctionsRow { MaxInteger = cInteger, MaxReal = cReal, MaxText = cText }; - var actual = await QuerySql.GetSqliteFunctions(); + var actual = await QuerySql.GetSqliteFunctionsAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetSqliteFunctionsRow x, QuerySql.GetSqliteFunctionsRow y) { @@ -419,10 +419,10 @@ void AssertSingularEquals(QuerySql.GetSqliteFunctionsRow x, QuerySql.GetSqliteFu [TestCase(100, 312, -7541.3309, "Johnny B. Good")] [TestCase(500, -768, 8453.5678, "Bad to the Bone")] [TestCase(10, null, null, null)] - public async Task TestCopyFrom(int batchSize, int? cInteger, decimal? cReal, string cText) + public async Task TestCopyFromAsync(int batchSize, int? cInteger, decimal? cReal, string cText) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertSqliteTypesBatchArgs { CInteger = cInteger, CReal = cReal, CText = cText }).ToList(); - await QuerySql.InsertSqliteTypesBatch(batchArgs); + await QuerySql.InsertSqliteTypesBatchAsync(batchArgs); var expected = new QuerySql.GetSqliteTypesCntRow { Cnt = batchSize, @@ -430,7 +430,7 @@ public async Task TestCopyFrom(int batchSize, int? cInteger, decimal? cReal, str CReal = cReal, CText = cText }; - var actual = await QuerySql.GetSqliteTypesCnt(); + var actual = await QuerySql.GetSqliteTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetSqliteTypesCntRow x, QuerySql.GetSqliteTypesCntRow y) { @@ -442,14 +442,14 @@ void AssertSingularEquals(QuerySql.GetSqliteTypesCntRow x, QuerySql.GetSqliteTyp } [Test] - public async Task TestSqliteTransaction() + public async Task TestSqliteTransactionAsync() { var connection = new Microsoft.Data.Sqlite.SqliteConnection(Environment.GetEnvironmentVariable(EndToEndCommon.SqliteConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); transaction.Commit(); var expected = new QuerySql.GetAuthorRow @@ -458,7 +458,7 @@ public async Task TestSqliteTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -469,15 +469,15 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestSqliteTransactionRollback() + public async Task TestSqliteTransactionRollbackAsync() { var connection = new Microsoft.Data.Sqlite.SqliteConnection(Environment.GetEnvironmentVariable(EndToEndCommon.SqliteConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var sqlQueryWithTx = QuerySql.WithTransaction(transaction); - await sqlQueryWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await sqlQueryWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); transaction.Rollback(); - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } } diff --git a/end2end/EndToEndTestsLegacy/SqliteTester.cs b/end2end/EndToEndTestsLegacy/SqliteTester.cs index e106129e..622241cc 100644 --- a/end2end/EndToEndTestsLegacy/SqliteTester.cs +++ b/end2end/EndToEndTestsLegacy/SqliteTester.cs @@ -13,8 +13,8 @@ public partial class SqliteTester [TearDown] public async Task EmptyTestsTable() { - await QuerySql.DeleteAllAuthors(); - await QuerySql.DeleteAllSqliteTypes(); + await QuerySql.DeleteAllAuthorsAsync(); + await QuerySql.DeleteAllSqliteTypesAsync(); } } } \ No newline at end of file diff --git a/end2end/EndToEndTestsLegacy/SqliteTester.generated.cs b/end2end/EndToEndTestsLegacy/SqliteTester.generated.cs index 5e4472ba..efde4c2f 100644 --- a/end2end/EndToEndTestsLegacy/SqliteTester.generated.cs +++ b/end2end/EndToEndTestsLegacy/SqliteTester.generated.cs @@ -13,17 +13,17 @@ namespace EndToEndTests public partial class SqliteTester { [Test] - public async Task TestOne() + public async Task TestOneAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new QuerySql.GetAuthorRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -34,10 +34,10 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestMany() + public async Task TestManyAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.ListAuthorsRow @@ -53,7 +53,7 @@ public async Task TestMany() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -71,21 +71,21 @@ void AssertSequenceEquals(List x, List { @@ -102,7 +102,7 @@ public async Task TestExecRows() Bio = "Quote that everyone always attribute to Einstein" } }; - var actual = await this.QuerySql.ListAuthors(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); + var actual = await this.QuerySql.ListAuthorsAsync(new QuerySql.ListAuthorsArgs { Limit = 2, Offset = 0 }); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAuthorsRow x, QuerySql.ListAuthorsRow y) { @@ -120,16 +120,16 @@ void AssertSequenceEquals(List x, List() { new QuerySql.GetDuplicateAuthorsRow @@ -162,7 +162,7 @@ public async Task TestSelfJoinEmbed() } } }; - var actual = await QuerySql.GetDuplicateAuthors(); + var actual = await QuerySql.GetDuplicateAuthorsAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.GetDuplicateAuthorsRow x, QuerySql.GetDuplicateAuthorsRow y) { @@ -183,12 +183,12 @@ void AssertSequenceEquals(List x, List() { new QuerySql.ListAllAuthorsBooksRow @@ -222,7 +222,7 @@ public async Task TestJoinEmbed() } } }; - var actual = await QuerySql.ListAllAuthorsBooks(); + var actual = await QuerySql.ListAllAuthorsBooksAsync(); AssertSequenceEquals(expected, actual); void AssertSingularEquals(QuerySql.ListAllAuthorsBooksRow x, QuerySql.ListAllAuthorsBooksRow y) { @@ -243,28 +243,28 @@ void AssertSequenceEquals(List x, List { new QuerySql.GetAuthorByNamePatternRow @@ -280,7 +280,7 @@ public async Task TestNargNull() Bio = "You'll miss the best things if you keep your eyes shut" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs()); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs()); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -298,10 +298,10 @@ void AssertSingularEquals(QuerySql.GetAuthorByNamePatternRow x, QuerySql.GetAuth } [Test] - public async Task TestNargNotNull() + public async Task TestNargNotNullAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 2222, Name = "Dr. Seuss", Bio = "You'll miss the best things if you keep your eyes shut" }); var expected = new List { new QuerySql.GetAuthorByNamePatternRow @@ -311,7 +311,7 @@ public async Task TestNargNotNull() Bio = "Back in the 90s he was in a very famous TV show" } }; - var actual = await this.QuerySql.GetAuthorByNamePattern(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); + var actual = await this.QuerySql.GetAuthorByNamePatternAsync(new QuerySql.GetAuthorByNamePatternArgs { NamePattern = "Bojack%" }); AssertSequenceEquals(expected, actual); void AssertSequenceEquals(List x, List y) { @@ -340,9 +340,9 @@ private static IEnumerable SqliteTypesTestCases [Test] [TestCaseSource(nameof(SqliteTypesTestCases))] - public async Task TestSqliteTypes(int? cInteger, decimal? cReal, string cText, byte[] cBlob, bool? cTextBoolOverride, bool? cIntegerBoolOverride, DateTime? cTextDatetimeOverride, DateTime? cIntegerDatetimeOverride, Instant? cTextNodaInstantOverride, Instant? cIntegerNodaInstantOverride) + public async Task TestSqliteTypesAsync(int? cInteger, decimal? cReal, string cText, byte[] cBlob, bool? cTextBoolOverride, bool? cIntegerBoolOverride, DateTime? cTextDatetimeOverride, DateTime? cIntegerDatetimeOverride, Instant? cTextNodaInstantOverride, Instant? cIntegerNodaInstantOverride) { - await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText, CBlob = cBlob, CTextBoolOverride = cTextBoolOverride, CIntegerBoolOverride = cIntegerBoolOverride, CTextDatetimeOverride = cTextDatetimeOverride, CIntegerDatetimeOverride = cIntegerDatetimeOverride, CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }); + await QuerySql.InsertSqliteTypesAsync(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText, CBlob = cBlob, CTextBoolOverride = cTextBoolOverride, CIntegerBoolOverride = cIntegerBoolOverride, CTextDatetimeOverride = cTextDatetimeOverride, CIntegerDatetimeOverride = cIntegerDatetimeOverride, CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }); var expected = new QuerySql.GetSqliteTypesRow { CInteger = cInteger, @@ -356,7 +356,7 @@ public async Task TestSqliteTypes(int? cInteger, decimal? cReal, string cText, b CTextNodaInstantOverride = cTextNodaInstantOverride, CIntegerNodaInstantOverride = cIntegerNodaInstantOverride }; - var actual = await QuerySql.GetSqliteTypes(); + var actual = await QuerySql.GetSqliteTypesAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetSqliteTypesRow x, QuerySql.GetSqliteTypesRow y) { @@ -374,16 +374,16 @@ void AssertSingularEquals(QuerySql.GetSqliteTypesRow x, QuerySql.GetSqliteTypesR } [Test] - public async Task TestGetAuthorByIdWithMultipleNamedParam() + public async Task TestGetAuthorByIdWithMultipleNamedParamAsync() { - await this.QuerySql.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await this.QuerySql.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); var expected = new QuerySql.GetAuthorByIdWithMultipleNamedParamRow { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - var actual = await this.QuerySql.GetAuthorByIdWithMultipleNamedParam(new QuerySql.GetAuthorByIdWithMultipleNamedParamArgs { IdArg = 1111, Take = 1 }); + var actual = await this.QuerySql.GetAuthorByIdWithMultipleNamedParamAsync(new QuerySql.GetAuthorByIdWithMultipleNamedParamArgs { IdArg = 1111, Take = 1 }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorByIdWithMultipleNamedParamRow x, QuerySql.GetAuthorByIdWithMultipleNamedParamRow y) { @@ -396,16 +396,16 @@ void AssertSingularEquals(QuerySql.GetAuthorByIdWithMultipleNamedParamRow x, Que [Test] [TestCase(-54355, 9787.66, "Have One On Me")] [TestCase(null, 0.0, null)] - public async Task TestSqliteDataTypesOverride(int? cInteger, decimal cReal, string cText) + public async Task TestSqliteDataTypesOverrideAsync(int? cInteger, decimal cReal, string cText) { - await QuerySql.InsertSqliteTypes(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText }); + await QuerySql.InsertSqliteTypesAsync(new QuerySql.InsertSqliteTypesArgs { CInteger = cInteger, CReal = cReal, CText = cText }); var expected = new QuerySql.GetSqliteFunctionsRow { MaxInteger = cInteger, MaxReal = cReal, MaxText = cText }; - var actual = await QuerySql.GetSqliteFunctions(); + var actual = await QuerySql.GetSqliteFunctionsAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetSqliteFunctionsRow x, QuerySql.GetSqliteFunctionsRow y) { @@ -419,10 +419,10 @@ void AssertSingularEquals(QuerySql.GetSqliteFunctionsRow x, QuerySql.GetSqliteFu [TestCase(100, 312, -7541.3309, "Johnny B. Good")] [TestCase(500, -768, 8453.5678, "Bad to the Bone")] [TestCase(10, null, null, null)] - public async Task TestCopyFrom(int batchSize, int? cInteger, decimal? cReal, string cText) + public async Task TestCopyFromAsync(int batchSize, int? cInteger, decimal? cReal, string cText) { var batchArgs = Enumerable.Range(0, batchSize).Select(_ => new QuerySql.InsertSqliteTypesBatchArgs { CInteger = cInteger, CReal = cReal, CText = cText }).ToList(); - await QuerySql.InsertSqliteTypesBatch(batchArgs); + await QuerySql.InsertSqliteTypesBatchAsync(batchArgs); var expected = new QuerySql.GetSqliteTypesCntRow { Cnt = batchSize, @@ -430,7 +430,7 @@ public async Task TestCopyFrom(int batchSize, int? cInteger, decimal? cReal, str CReal = cReal, CText = cText }; - var actual = await QuerySql.GetSqliteTypesCnt(); + var actual = await QuerySql.GetSqliteTypesCntAsync(); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetSqliteTypesCntRow x, QuerySql.GetSqliteTypesCntRow y) { @@ -442,14 +442,14 @@ void AssertSingularEquals(QuerySql.GetSqliteTypesCntRow x, QuerySql.GetSqliteTyp } [Test] - public async Task TestSqliteTransaction() + public async Task TestSqliteTransactionAsync() { var connection = new Microsoft.Data.Sqlite.SqliteConnection(Environment.GetEnvironmentVariable(EndToEndCommon.SqliteConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var querySqlWithTx = QuerySql.WithTransaction(transaction); - await querySqlWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); - var actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + await querySqlWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + var actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); transaction.Commit(); var expected = new QuerySql.GetAuthorRow @@ -458,7 +458,7 @@ public async Task TestSqliteTransaction() Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }; - actual = await QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + actual = await QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); AssertSingularEquals(expected, actual); void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) { @@ -469,15 +469,15 @@ void AssertSingularEquals(QuerySql.GetAuthorRow x, QuerySql.GetAuthorRow y) } [Test] - public async Task TestSqliteTransactionRollback() + public async Task TestSqliteTransactionRollbackAsync() { var connection = new Microsoft.Data.Sqlite.SqliteConnection(Environment.GetEnvironmentVariable(EndToEndCommon.SqliteConnectionStringEnv)); await connection.OpenAsync(); var transaction = connection.BeginTransaction(); var sqlQueryWithTx = QuerySql.WithTransaction(transaction); - await sqlQueryWithTx.CreateAuthor(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); + await sqlQueryWithTx.CreateAuthorAsync(new QuerySql.CreateAuthorArgs { Id = 1111, Name = "Bojack Horseman", Bio = "Back in the 90s he was in a very famous TV show" }); transaction.Rollback(); - var actual = await this.QuerySql.GetAuthor(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); + var actual = await this.QuerySql.GetAuthorAsync(new QuerySql.GetAuthorArgs { Name = "Bojack Horseman" }); ClassicAssert.IsNull(actual); } } diff --git a/examples/MySqlConnectorDapperExample/QuerySql.cs b/examples/MySqlConnectorDapperExample/QuerySql.cs index 59acb538..b32a1418 100644 --- a/examples/MySqlConnectorDapperExample/QuerySql.cs +++ b/examples/MySqlConnectorDapperExample/QuerySql.cs @@ -57,7 +57,7 @@ public class GetAuthorArgs { public required string Name { get; init; } }; - public async Task GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -90,7 +90,7 @@ public class ListAuthorsArgs public required int Limit { get; init; } public required int Offset { get; init; } }; - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("limit", args.Limit); @@ -116,7 +116,7 @@ public class CreateAuthorArgs public required string Name { get; init; } public string? Bio { get; init; } }; - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -140,7 +140,7 @@ public class CreateAuthorReturnIdArgs public required string Name { get; init; } public string? Bio { get; init; } }; - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -167,7 +167,7 @@ public class GetAuthorByIdArgs { public required long Id { get; init; } }; - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -197,7 +197,7 @@ public class GetAuthorByNamePatternArgs { public string? NamePattern { get; init; } }; - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { var queryParams = new Dictionary(); queryParams.Add("name_pattern", args.NamePattern); @@ -221,7 +221,7 @@ public class DeleteAuthorArgs { public required string Name { get; init; } }; - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -238,7 +238,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) } private const string DeleteAllAuthorsSql = "DELETE FROM authors"; - public async Task DeleteAllAuthors() + public async Task DeleteAllAuthorsAsync() { if (this.Transaction == null) { @@ -259,7 +259,7 @@ public class UpdateAuthorsArgs { public string? Bio { get; init; } }; - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("bio", args.Bio); @@ -285,7 +285,7 @@ public class GetAuthorsByIdsArgs { public required long[] Ids { get; init; } }; - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var transformedSql = GetAuthorsByIdsSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -318,7 +318,7 @@ public class GetAuthorsByIdsAndNamesArgs public required long[] Ids { get; init; } public required string[] Names { get; init; } }; - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var transformedSql = GetAuthorsByIdsAndNamesSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -348,7 +348,7 @@ public class CreateBookArgs public required string Name { get; init; } public required long AuthorId { get; init; } }; - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -372,7 +372,7 @@ public class ListAllAuthorsBooksRow public required Author? Author { get; init; } public required Book? Book { get; init; } }; - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -416,7 +416,7 @@ public class GetDuplicateAuthorsRow public required Author? Author { get; init; } public required Author? Author2 { get; init; } }; - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -466,7 +466,7 @@ public class GetAuthorsByBookNameArgs { public required string Name { get; init; } }; - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -512,7 +512,7 @@ public class CreateExtendedBioArgs public BiosBioType? BioType { get; init; } public HashSet? AuthorType { get; init; } }; - public async Task CreateExtendedBio(CreateExtendedBioArgs args) + public async Task CreateExtendedBioAsync(CreateExtendedBioArgs args) { var queryParams = new Dictionary(); queryParams.Add("author_name", args.AuthorName); @@ -543,7 +543,7 @@ public class GetFirstExtendedBioByTypeArgs { public BiosBioType? BioType { get; init; } }; - public async Task GetFirstExtendedBioByType(GetFirstExtendedBioByTypeArgs args) + public async Task GetFirstExtendedBioByTypeAsync(GetFirstExtendedBioByTypeArgs args) { var queryParams = new Dictionary(); queryParams.Add("bio_type", args.BioType); @@ -562,7 +562,7 @@ public class GetFirstExtendedBioByTypeArgs } private const string TruncateExtendedBiosSql = "TRUNCATE TABLE extended.bios"; - public async Task TruncateExtendedBios() + public async Task TruncateExtendedBiosAsync() { if (this.Transaction == null) { @@ -614,7 +614,7 @@ public class InsertMysqlNumericTypesArgs public double? CDouble { get; init; } public double? CDoublePrecision { get; init; } }; - public async Task InsertMysqlNumericTypes(InsertMysqlNumericTypesArgs args) + public async Task InsertMysqlNumericTypesAsync(InsertMysqlNumericTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_bool", args.CBool); @@ -662,7 +662,7 @@ public class InsertMysqlNumericTypesBatchArgs public double? CDouble { get; init; } public double? CDoublePrecision { get; init; } }; - public async Task InsertMysqlNumericTypesBatch(List args) + public async Task InsertMysqlNumericTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -732,7 +732,7 @@ public class GetMysqlNumericTypesRow public double? CDouble { get; init; } public double? CDoublePrecision { get; init; } }; - public async Task GetMysqlNumericTypes() + public async Task GetMysqlNumericTypesAsync() { if (this.Transaction == null) { @@ -802,7 +802,7 @@ public class GetMysqlNumericTypesCntRow public double? CDouble { get; init; } public double? CDoublePrecision { get; init; } }; - public async Task GetMysqlNumericTypesCnt() + public async Task GetMysqlNumericTypesCntAsync() { if (this.Transaction == null) { @@ -819,7 +819,7 @@ public class GetMysqlNumericTypesCntRow } private const string TruncateMysqlNumericTypesSql = "TRUNCATE TABLE mysql_numeric_types"; - public async Task TruncateMysqlNumericTypes() + public async Task TruncateMysqlNumericTypesAsync() { if (this.Transaction == null) { @@ -865,7 +865,7 @@ public class InsertMysqlStringTypesArgs public MysqlStringTypesCEnum? CEnum { get; init; } public HashSet? CSet { get; init; } }; - public async Task InsertMysqlStringTypes(InsertMysqlStringTypesArgs args) + public async Task InsertMysqlStringTypesAsync(InsertMysqlStringTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_char", args.CChar); @@ -907,7 +907,7 @@ public class InsertMysqlStringTypesBatchArgs public MysqlStringTypesCEnum? CEnum { get; init; } public HashSet? CSet { get; init; } }; - public async Task InsertMysqlStringTypesBatch(List args) + public async Task InsertMysqlStringTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -972,7 +972,7 @@ public class GetMysqlStringTypesRow public MysqlStringTypesCEnum? CEnum { get; init; } public HashSet? CSet { get; init; } }; - public async Task GetMysqlStringTypes() + public async Task GetMysqlStringTypesAsync() { if (this.Transaction == null) { @@ -1033,7 +1033,7 @@ public class GetMysqlStringTypesCntRow public MysqlStringTypesCEnum? CEnum { get; init; } public HashSet? CSet { get; init; } }; - public async Task GetMysqlStringTypesCnt() + public async Task GetMysqlStringTypesCntAsync() { if (this.Transaction == null) { @@ -1050,7 +1050,7 @@ public class GetMysqlStringTypesCntRow } private const string TruncateMysqlStringTypesSql = "TRUNCATE TABLE mysql_string_types"; - public async Task TruncateMysqlStringTypes() + public async Task TruncateMysqlStringTypesAsync() { if (this.Transaction == null) { @@ -1084,7 +1084,7 @@ public class InsertMysqlDatetimeTypesArgs public TimeSpan? CTime { get; init; } public Instant? CTimestampNodaInstantOverride { get; init; } }; - public async Task InsertMysqlDatetimeTypes(InsertMysqlDatetimeTypesArgs args) + public async Task InsertMysqlDatetimeTypesAsync(InsertMysqlDatetimeTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_year", args.CYear); @@ -1113,7 +1113,7 @@ public class InsertMysqlDatetimeTypesBatchArgs public DateTime? CTimestamp { get; init; } public TimeSpan? CTime { get; init; } }; - public async Task InsertMysqlDatetimeTypesBatch(List args) + public async Task InsertMysqlDatetimeTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -1170,7 +1170,7 @@ public class GetMysqlDatetimeTypesRow public TimeSpan? CTime { get; init; } public Instant? CTimestampNodaInstantOverride { get; init; } }; - public async Task GetMysqlDatetimeTypes() + public async Task GetMysqlDatetimeTypesAsync() { if (this.Transaction == null) { @@ -1210,7 +1210,7 @@ public class GetMysqlDatetimeTypesCntRow public DateTime? CTimestamp { get; init; } public TimeSpan? CTime { get; init; } }; - public async Task GetMysqlDatetimeTypesCnt() + public async Task GetMysqlDatetimeTypesCntAsync() { if (this.Transaction == null) { @@ -1227,7 +1227,7 @@ public class GetMysqlDatetimeTypesCntRow } private const string TruncateMysqlDatetimeTypesSql = "TRUNCATE TABLE mysql_datetime_types"; - public async Task TruncateMysqlDatetimeTypes() + public async Task TruncateMysqlDatetimeTypesAsync() { if (this.Transaction == null) { @@ -1263,7 +1263,7 @@ public class InsertMysqlBinaryTypesArgs public byte[]? CMediumblob { get; init; } public byte[]? CLongblob { get; init; } }; - public async Task InsertMysqlBinaryTypes(InsertMysqlBinaryTypesArgs args) + public async Task InsertMysqlBinaryTypesAsync(InsertMysqlBinaryTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_bit", args.CBit); @@ -1295,7 +1295,7 @@ public class InsertMysqlBinaryTypesBatchArgs public byte[]? CMediumblob { get; init; } public byte[]? CLongblob { get; init; } }; - public async Task InsertMysqlBinaryTypesBatch(List args) + public async Task InsertMysqlBinaryTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -1354,7 +1354,7 @@ public class GetMysqlBinaryTypesRow public byte[]? CMediumblob { get; init; } public byte[]? CLongblob { get; init; } }; - public async Task GetMysqlBinaryTypes() + public async Task GetMysqlBinaryTypesAsync() { if (this.Transaction == null) { @@ -1400,7 +1400,7 @@ public class GetMysqlBinaryTypesCntRow public byte[]? CMediumblob { get; init; } public byte[]? CLongblob { get; init; } }; - public async Task GetMysqlBinaryTypesCnt() + public async Task GetMysqlBinaryTypesCntAsync() { if (this.Transaction == null) { @@ -1417,7 +1417,7 @@ public class GetMysqlBinaryTypesCntRow } private const string TruncateMysqlBinaryTypesSql = "TRUNCATE TABLE mysql_binary_types"; - public async Task TruncateMysqlBinaryTypes() + public async Task TruncateMysqlBinaryTypesAsync() { if (this.Transaction == null) { @@ -1445,7 +1445,7 @@ public class GetMysqlFunctionsRow public string? MaxVarchar { get; init; } public required DateTime MaxTimestamp { get; init; } }; - public async Task GetMysqlFunctions() + public async Task GetMysqlFunctionsAsync() { if (this.Transaction == null) { diff --git a/examples/MySqlConnectorDapperExample/request.json b/examples/MySqlConnectorDapperExample/request.json index fab8a612..6ba785c6 100644 --- a/examples/MySqlConnectorDapperExample/request.json +++ b/examples/MySqlConnectorDapperExample/request.json @@ -3807,5 +3807,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6Ik15U3FsQ29ubmVjdG9yRGFwcGVyRXhhbXBsZUdlbiIsInVzZURhcHBlciI6dHJ1ZSwib3ZlcnJpZGVEYXBwZXJWZXJzaW9uIjoiIiwib3ZlcnJpZGVzIjpbeyJjb2x1bW4iOiJHZXRNeXNxbEZ1bmN0aW9uczptYXhfaW50IiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImludCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRNeXNxbEZ1bmN0aW9uczptYXhfdmFyY2hhciIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0TXlzcWxGdW5jdGlvbnM6bWF4X3RpbWVzdGFtcCIsImNzaGFycF90eXBlIjp7InR5cGUiOiJEYXRlVGltZSIsIm5vdE51bGwiOnRydWV9fSx7ImNvbHVtbiI6Iio6Y19qc29uX3N0cmluZ19vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RpbWVzdGFtcF9ub2RhX2luc3RhbnRfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSW5zdGFudCIsIm5vdE51bGwiOmZhbHNlfX1dLCJkZWJ1Z1JlcXVlc3QiOmZhbHNlLCJ1c2VDZW50cmFsUGFja2FnZU1hbmFnZW1lbnQiOmZhbHNlfQ==" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6Ik15U3FsQ29ubmVjdG9yRGFwcGVyRXhhbXBsZUdlbiIsInVzZURhcHBlciI6dHJ1ZSwib3ZlcnJpZGVEYXBwZXJWZXJzaW9uIjoiIiwib3ZlcnJpZGVzIjpbeyJjb2x1bW4iOiJHZXRNeXNxbEZ1bmN0aW9uczptYXhfaW50IiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImludCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRNeXNxbEZ1bmN0aW9uczptYXhfdmFyY2hhciIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0TXlzcWxGdW5jdGlvbnM6bWF4X3RpbWVzdGFtcCIsImNzaGFycF90eXBlIjp7InR5cGUiOiJEYXRlVGltZSIsIm5vdE51bGwiOnRydWV9fSx7ImNvbHVtbiI6Iio6Y19qc29uX3N0cmluZ19vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RpbWVzdGFtcF9ub2RhX2luc3RhbnRfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSW5zdGFudCIsIm5vdE51bGwiOmZhbHNlfX1dLCJkZWJ1Z1JlcXVlc3QiOmZhbHNlLCJ1c2VDZW50cmFsUGFja2FnZU1hbmFnZW1lbnQiOmZhbHNlLCJ3aXRoQXN5bmNTdWZmaXgiOnRydWV9" } \ No newline at end of file diff --git a/examples/MySqlConnectorDapperExample/request.message b/examples/MySqlConnectorDapperExample/request.message index 8a37685a502ed1a0fc3a610d18a643aefb45b782..8ed17f64a979083d399f0b814f1e391547005133 100644 GIT binary patch delta 41 xcmZoX$2j90;|9+Z# GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -91,7 +91,7 @@ public class ListAuthorsArgs public int Limit { get; set; } public int Offset { get; set; } }; - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("limit", args.Limit); @@ -117,7 +117,7 @@ public class CreateAuthorArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -141,7 +141,7 @@ public class CreateAuthorReturnIdArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -168,7 +168,7 @@ public class GetAuthorByIdArgs { public long Id { get; set; } }; - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -198,7 +198,7 @@ public class GetAuthorByNamePatternArgs { public string NamePattern { get; set; } }; - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { var queryParams = new Dictionary(); queryParams.Add("name_pattern", args.NamePattern); @@ -222,7 +222,7 @@ public class DeleteAuthorArgs { public string Name { get; set; } }; - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -239,7 +239,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) } private const string DeleteAllAuthorsSql = "DELETE FROM authors"; - public async Task DeleteAllAuthors() + public async Task DeleteAllAuthorsAsync() { if (this.Transaction == null) { @@ -260,7 +260,7 @@ public class UpdateAuthorsArgs { public string Bio { get; set; } }; - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("bio", args.Bio); @@ -286,7 +286,7 @@ public class GetAuthorsByIdsArgs { public long[] Ids { get; set; } }; - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var transformedSql = GetAuthorsByIdsSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -319,7 +319,7 @@ public class GetAuthorsByIdsAndNamesArgs public long[] Ids { get; set; } public string[] Names { get; set; } }; - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var transformedSql = GetAuthorsByIdsAndNamesSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -349,7 +349,7 @@ public class CreateBookArgs public string Name { get; set; } public long AuthorId { get; set; } }; - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -373,7 +373,7 @@ public class ListAllAuthorsBooksRow public Author Author { get; set; } public Book Book { get; set; } }; - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -417,7 +417,7 @@ public class GetDuplicateAuthorsRow public Author Author { get; set; } public Author Author2 { get; set; } }; - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -467,7 +467,7 @@ public class GetAuthorsByBookNameArgs { public string Name { get; set; } }; - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -513,7 +513,7 @@ public class CreateExtendedBioArgs public BiosBioType? BioType { get; set; } public HashSet AuthorType { get; set; } }; - public async Task CreateExtendedBio(CreateExtendedBioArgs args) + public async Task CreateExtendedBioAsync(CreateExtendedBioArgs args) { var queryParams = new Dictionary(); queryParams.Add("author_name", args.AuthorName); @@ -544,7 +544,7 @@ public class GetFirstExtendedBioByTypeArgs { public BiosBioType? BioType { get; set; } }; - public async Task GetFirstExtendedBioByType(GetFirstExtendedBioByTypeArgs args) + public async Task GetFirstExtendedBioByTypeAsync(GetFirstExtendedBioByTypeArgs args) { var queryParams = new Dictionary(); queryParams.Add("bio_type", args.BioType); @@ -563,7 +563,7 @@ public async Task GetFirstExtendedBioByType(GetFir } private const string TruncateExtendedBiosSql = "TRUNCATE TABLE extended.bios"; - public async Task TruncateExtendedBios() + public async Task TruncateExtendedBiosAsync() { if (this.Transaction == null) { @@ -615,7 +615,7 @@ public class InsertMysqlNumericTypesArgs public double? CDouble { get; set; } public double? CDoublePrecision { get; set; } }; - public async Task InsertMysqlNumericTypes(InsertMysqlNumericTypesArgs args) + public async Task InsertMysqlNumericTypesAsync(InsertMysqlNumericTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_bool", args.CBool); @@ -663,7 +663,7 @@ public class InsertMysqlNumericTypesBatchArgs public double? CDouble { get; set; } public double? CDoublePrecision { get; set; } }; - public async Task InsertMysqlNumericTypesBatch(List args) + public async Task InsertMysqlNumericTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -733,7 +733,7 @@ public class GetMysqlNumericTypesRow public double? CDouble { get; set; } public double? CDoublePrecision { get; set; } }; - public async Task GetMysqlNumericTypes() + public async Task GetMysqlNumericTypesAsync() { if (this.Transaction == null) { @@ -803,7 +803,7 @@ public class GetMysqlNumericTypesCntRow public double? CDouble { get; set; } public double? CDoublePrecision { get; set; } }; - public async Task GetMysqlNumericTypesCnt() + public async Task GetMysqlNumericTypesCntAsync() { if (this.Transaction == null) { @@ -820,7 +820,7 @@ public async Task GetMysqlNumericTypesCnt() } private const string TruncateMysqlNumericTypesSql = "TRUNCATE TABLE mysql_numeric_types"; - public async Task TruncateMysqlNumericTypes() + public async Task TruncateMysqlNumericTypesAsync() { if (this.Transaction == null) { @@ -866,7 +866,7 @@ public class InsertMysqlStringTypesArgs public MysqlStringTypesCEnum? CEnum { get; set; } public HashSet CSet { get; set; } }; - public async Task InsertMysqlStringTypes(InsertMysqlStringTypesArgs args) + public async Task InsertMysqlStringTypesAsync(InsertMysqlStringTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_char", args.CChar); @@ -908,7 +908,7 @@ public class InsertMysqlStringTypesBatchArgs public MysqlStringTypesCEnum? CEnum { get; set; } public HashSet CSet { get; set; } }; - public async Task InsertMysqlStringTypesBatch(List args) + public async Task InsertMysqlStringTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -972,7 +972,7 @@ public class GetMysqlStringTypesRow public MysqlStringTypesCEnum? CEnum { get; set; } public HashSet CSet { get; set; } }; - public async Task GetMysqlStringTypes() + public async Task GetMysqlStringTypesAsync() { if (this.Transaction == null) { @@ -1033,7 +1033,7 @@ public class GetMysqlStringTypesCntRow public MysqlStringTypesCEnum? CEnum { get; set; } public HashSet CSet { get; set; } }; - public async Task GetMysqlStringTypesCnt() + public async Task GetMysqlStringTypesCntAsync() { if (this.Transaction == null) { @@ -1050,7 +1050,7 @@ public async Task GetMysqlStringTypesCnt() } private const string TruncateMysqlStringTypesSql = "TRUNCATE TABLE mysql_string_types"; - public async Task TruncateMysqlStringTypes() + public async Task TruncateMysqlStringTypesAsync() { if (this.Transaction == null) { @@ -1084,7 +1084,7 @@ public class InsertMysqlDatetimeTypesArgs public TimeSpan? CTime { get; set; } public Instant? CTimestampNodaInstantOverride { get; set; } }; - public async Task InsertMysqlDatetimeTypes(InsertMysqlDatetimeTypesArgs args) + public async Task InsertMysqlDatetimeTypesAsync(InsertMysqlDatetimeTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_year", args.CYear); @@ -1113,7 +1113,7 @@ public class InsertMysqlDatetimeTypesBatchArgs public DateTime? CTimestamp { get; set; } public TimeSpan? CTime { get; set; } }; - public async Task InsertMysqlDatetimeTypesBatch(List args) + public async Task InsertMysqlDatetimeTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -1170,7 +1170,7 @@ public class GetMysqlDatetimeTypesRow public TimeSpan? CTime { get; set; } public Instant? CTimestampNodaInstantOverride { get; set; } }; - public async Task GetMysqlDatetimeTypes() + public async Task GetMysqlDatetimeTypesAsync() { if (this.Transaction == null) { @@ -1210,7 +1210,7 @@ public class GetMysqlDatetimeTypesCntRow public DateTime? CTimestamp { get; set; } public TimeSpan? CTime { get; set; } }; - public async Task GetMysqlDatetimeTypesCnt() + public async Task GetMysqlDatetimeTypesCntAsync() { if (this.Transaction == null) { @@ -1227,7 +1227,7 @@ public async Task GetMysqlDatetimeTypesCnt() } private const string TruncateMysqlDatetimeTypesSql = "TRUNCATE TABLE mysql_datetime_types"; - public async Task TruncateMysqlDatetimeTypes() + public async Task TruncateMysqlDatetimeTypesAsync() { if (this.Transaction == null) { @@ -1263,7 +1263,7 @@ public class InsertMysqlBinaryTypesArgs public byte[] CMediumblob { get; set; } public byte[] CLongblob { get; set; } }; - public async Task InsertMysqlBinaryTypes(InsertMysqlBinaryTypesArgs args) + public async Task InsertMysqlBinaryTypesAsync(InsertMysqlBinaryTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_bit", args.CBit); @@ -1295,7 +1295,7 @@ public class InsertMysqlBinaryTypesBatchArgs public byte[] CMediumblob { get; set; } public byte[] CLongblob { get; set; } }; - public async Task InsertMysqlBinaryTypesBatch(List args) + public async Task InsertMysqlBinaryTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -1353,7 +1353,7 @@ public class GetMysqlBinaryTypesRow public byte[] CMediumblob { get; set; } public byte[] CLongblob { get; set; } }; - public async Task GetMysqlBinaryTypes() + public async Task GetMysqlBinaryTypesAsync() { if (this.Transaction == null) { @@ -1399,7 +1399,7 @@ public class GetMysqlBinaryTypesCntRow public byte[] CMediumblob { get; set; } public byte[] CLongblob { get; set; } }; - public async Task GetMysqlBinaryTypesCnt() + public async Task GetMysqlBinaryTypesCntAsync() { if (this.Transaction == null) { @@ -1416,7 +1416,7 @@ public async Task GetMysqlBinaryTypesCnt() } private const string TruncateMysqlBinaryTypesSql = "TRUNCATE TABLE mysql_binary_types"; - public async Task TruncateMysqlBinaryTypes() + public async Task TruncateMysqlBinaryTypesAsync() { if (this.Transaction == null) { @@ -1444,7 +1444,7 @@ public class GetMysqlFunctionsRow public string MaxVarchar { get; set; } public DateTime MaxTimestamp { get; set; } }; - public async Task GetMysqlFunctions() + public async Task GetMysqlFunctionsAsync() { if (this.Transaction == null) { diff --git a/examples/MySqlConnectorDapperLegacyExample/request.json b/examples/MySqlConnectorDapperLegacyExample/request.json index 3a452ad5..75d416cd 100644 --- a/examples/MySqlConnectorDapperLegacyExample/request.json +++ b/examples/MySqlConnectorDapperLegacyExample/request.json @@ -3807,5 +3807,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiTXlTcWxDb25uZWN0b3JEYXBwZXJMZWdhY3lFeGFtcGxlR2VuIiwidXNlRGFwcGVyIjp0cnVlLCJvdmVycmlkZURhcHBlclZlcnNpb24iOiIiLCJvdmVycmlkZXMiOlt7ImNvbHVtbiI6IkdldE15c3FsRnVuY3Rpb25zOm1heF9pbnQiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiaW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldE15c3FsRnVuY3Rpb25zOm1heF92YXJjaGFyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRNeXNxbEZ1bmN0aW9uczptYXhfdGltZXN0YW1wIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6dHJ1ZX19LHsiY29sdW1uIjoiKjpjX2pzb25fc3RyaW5nX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGltZXN0YW1wX25vZGFfaW5zdGFudF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJJbnN0YW50Iiwibm90TnVsbCI6ZmFsc2V9fV0sImRlYnVnUmVxdWVzdCI6ZmFsc2UsInVzZUNlbnRyYWxQYWNrYWdlTWFuYWdlbWVudCI6ZmFsc2V9" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiTXlTcWxDb25uZWN0b3JEYXBwZXJMZWdhY3lFeGFtcGxlR2VuIiwidXNlRGFwcGVyIjp0cnVlLCJvdmVycmlkZURhcHBlclZlcnNpb24iOiIiLCJvdmVycmlkZXMiOlt7ImNvbHVtbiI6IkdldE15c3FsRnVuY3Rpb25zOm1heF9pbnQiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiaW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldE15c3FsRnVuY3Rpb25zOm1heF92YXJjaGFyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRNeXNxbEZ1bmN0aW9uczptYXhfdGltZXN0YW1wIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6dHJ1ZX19LHsiY29sdW1uIjoiKjpjX2pzb25fc3RyaW5nX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGltZXN0YW1wX25vZGFfaW5zdGFudF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJJbnN0YW50Iiwibm90TnVsbCI6ZmFsc2V9fV0sImRlYnVnUmVxdWVzdCI6ZmFsc2UsInVzZUNlbnRyYWxQYWNrYWdlTWFuYWdlbWVudCI6ZmFsc2UsIndpdGhBc3luY1N1ZmZpeCI6dHJ1ZX0=" } \ No newline at end of file diff --git a/examples/MySqlConnectorDapperLegacyExample/request.message b/examples/MySqlConnectorDapperLegacyExample/request.message index 35663d37058213a0c3ab2ba62627921414a507de..6573ce32277ac815c14df3d9459a44d541019214 100644 GIT binary patch delta 41 xcmZ2{j&avH#tpG4jJG$(r5s_B&`~PSEXi;zuFOjgE=^0ztWdHlDJo5^1psc>5V8OO delta 18 acmdmWj&boh#tpG4j7K)dr5s^mtOWp4v GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { if (this.Transaction == null) { @@ -104,7 +104,7 @@ ORDER BY name LIMIT @limit OFFSET @offset"; public readonly record struct ListAuthorsRow(long Id, string Name, string? Bio); public readonly record struct ListAuthorsArgs(int Limit, int Offset); - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { if (this.Transaction == null) { @@ -146,7 +146,7 @@ public async Task> ListAuthors(ListAuthorsArgs args) private const string CreateAuthorSql = "INSERT INTO authors (id, name, bio) VALUES (@id, @name, @bio)"; public readonly record struct CreateAuthorArgs(long Id, string Name, string? Bio); - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { if (this.Transaction == null) { @@ -180,7 +180,7 @@ public async Task CreateAuthor(CreateAuthorArgs args) private const string CreateAuthorReturnIdSql = "INSERT INTO authors (name, bio) VALUES (@name, @bio)"; public readonly record struct CreateAuthorReturnIdArgs(string Name, string? Bio); - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { if (this.Transaction == null) { @@ -213,7 +213,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) private const string GetAuthorByIdSql = "SELECT id, name, bio FROM authors WHERE id = @id LIMIT 1"; public readonly record struct GetAuthorByIdRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorByIdArgs(long Id); - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { if (this.Transaction == null) { @@ -269,7 +269,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) WHERE name LIKE COALESCE(@name_pattern, '%')"; public readonly record struct GetAuthorByNamePatternRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorByNamePatternArgs(string? NamePattern); - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { if (this.Transaction == null) { @@ -310,7 +310,7 @@ public async Task> GetAuthorByNamePattern(GetAut private const string DeleteAuthorSql = @"DELETE FROM authors WHERE name = @name"; public readonly record struct DeleteAuthorArgs(string Name); - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { if (this.Transaction == null) { @@ -339,7 +339,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) } private const string DeleteAllAuthorsSql = "DELETE FROM authors"; - public async Task DeleteAllAuthors() + public async Task DeleteAllAuthorsAsync() { if (this.Transaction == null) { @@ -369,7 +369,7 @@ public async Task DeleteAllAuthors() SET bio = @bio WHERE bio IS NOT NULL"; public readonly record struct UpdateAuthorsArgs(string? Bio); - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { if (this.Transaction == null) { @@ -398,7 +398,7 @@ public async Task UpdateAuthors(UpdateAuthorsArgs args) private const string GetAuthorsByIdsSql = "SELECT id, name, bio FROM authors WHERE id IN (/*SLICE:ids*/@ids)"; public readonly record struct GetAuthorsByIdsRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsArgs(long[] Ids); - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var transformedSql = GetAuthorsByIdsSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -443,7 +443,7 @@ public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs private const string GetAuthorsByIdsAndNamesSql = "SELECT id, name, bio FROM authors WHERE id IN (/*SLICE:ids*/@ids) AND name IN (/*SLICE:names*/@names)"; public readonly record struct GetAuthorsByIdsAndNamesRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsAndNamesArgs(long[] Ids, string[] Names); - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var transformedSql = GetAuthorsByIdsAndNamesSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -492,7 +492,7 @@ public async Task> GetAuthorsByIdsAndNames(GetA private const string CreateBookSql = "INSERT INTO books (name, author_id) VALUES (@name, @author_id)"; public readonly record struct CreateBookArgs(string Name, long AuthorId); - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { if (this.Transaction == null) { @@ -526,7 +526,7 @@ public async Task CreateBook(CreateBookArgs args) FROM authors JOIN books ON authors.id = books.author_id ORDER BY authors.name"; public readonly record struct ListAllAuthorsBooksRow(Author? Author, Book? Book); - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -566,7 +566,7 @@ public async Task> ListAllAuthorsBooks() FROM authors authors1 JOIN authors authors2 ON authors1.name = authors2.name WHERE authors1.id < authors2.id"; public readonly record struct GetDuplicateAuthorsRow(Author? Author, Author? Author2); - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -607,7 +607,7 @@ public async Task> GetDuplicateAuthors() WHERE books.name = @name"; public readonly record struct GetAuthorsByBookNameRow(long Id, string Name, string? Bio, Book? Book); public readonly record struct GetAuthorsByBookNameArgs(string Name); - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -647,7 +647,7 @@ public async Task> GetAuthorsByBookName(GetAuthors private const string CreateExtendedBioSql = "INSERT INTO extended.bios (author_name, name, bio_type, author_type) VALUES (@author_name, @name, @bio_type, @author_type)"; public readonly record struct CreateExtendedBioArgs(string? AuthorName, string? Name, BiosBioType? BioType, HashSet? AuthorType); - public async Task CreateExtendedBio(CreateExtendedBioArgs args) + public async Task CreateExtendedBioAsync(CreateExtendedBioArgs args) { if (this.Transaction == null) { @@ -684,7 +684,7 @@ public async Task CreateExtendedBio(CreateExtendedBioArgs args) private const string GetFirstExtendedBioByTypeSql = "SELECT author_name, name, bio_type, author_type FROM extended.bios WHERE bio_type = @bio_type LIMIT 1"; public readonly record struct GetFirstExtendedBioByTypeRow(string? AuthorName, string? Name, BiosBioType? BioType, HashSet? AuthorType); public readonly record struct GetFirstExtendedBioByTypeArgs(BiosBioType? BioType); - public async Task GetFirstExtendedBioByType(GetFirstExtendedBioByTypeArgs args) + public async Task GetFirstExtendedBioByTypeAsync(GetFirstExtendedBioByTypeArgs args) { if (this.Transaction == null) { @@ -739,7 +739,7 @@ public async Task CreateExtendedBio(CreateExtendedBioArgs args) } private const string TruncateExtendedBiosSql = "TRUNCATE TABLE extended.bios"; - public async Task TruncateExtendedBios() + public async Task TruncateExtendedBiosAsync() { if (this.Transaction == null) { @@ -786,7 +786,7 @@ INSERT INTO mysql_numeric_types ) VALUES (@c_bool, @c_boolean, @c_tinyint, @c_smallint, @c_mediumint, @c_int, @c_integer, @c_bigint, @c_decimal, @c_dec, @c_numeric, @c_fixed, @c_float, @c_double, @c_double_precision)"; public readonly record struct InsertMysqlNumericTypesArgs(bool? CBool, bool? CBoolean, short? CTinyint, short? CSmallint, int? CMediumint, int? CInt, int? CInteger, long? CBigint, decimal? CDecimal, decimal? CDec, decimal? CNumeric, decimal? CFixed, double? CFloat, double? CDouble, double? CDoublePrecision); - public async Task InsertMysqlNumericTypes(InsertMysqlNumericTypesArgs args) + public async Task InsertMysqlNumericTypesAsync(InsertMysqlNumericTypesArgs args) { if (this.Transaction == null) { @@ -843,7 +843,7 @@ public async Task InsertMysqlNumericTypes(InsertMysqlNumericTypesArgs args) } public readonly record struct InsertMysqlNumericTypesBatchArgs(bool? CBool, bool? CBoolean, short? CTinyint, short? CSmallint, int? CMediumint, int? CInt, int? CInteger, long? CBigint, double? CFloat, decimal? CNumeric, decimal? CDecimal, decimal? CDec, decimal? CFixed, double? CDouble, double? CDoublePrecision); - public async Task InsertMysqlNumericTypesBatch(List args) + public async Task InsertMysqlNumericTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -896,7 +896,7 @@ public async Task InsertMysqlNumericTypesBatch(List GetMysqlNumericTypes() + public async Task GetMysqlNumericTypesAsync() { if (this.Transaction == null) { @@ -1006,7 +1006,7 @@ GROUP BY c_double_precision LIMIT 1"; public readonly record struct GetMysqlNumericTypesCntRow(long Cnt, bool? CBool, bool? CBoolean, short? CTinyint, short? CSmallint, int? CMediumint, int? CInt, int? CInteger, long? CBigint, double? CFloat, decimal? CNumeric, decimal? CDecimal, decimal? CDec, decimal? CFixed, double? CDouble, double? CDoublePrecision); - public async Task GetMysqlNumericTypesCnt() + public async Task GetMysqlNumericTypesCntAsync() { if (this.Transaction == null) { @@ -1083,7 +1083,7 @@ GROUP BY } private const string TruncateMysqlNumericTypesSql = "TRUNCATE TABLE mysql_numeric_types"; - public async Task TruncateMysqlNumericTypes() + public async Task TruncateMysqlNumericTypesAsync() { if (this.Transaction == null) { @@ -1127,7 +1127,7 @@ INSERT INTO mysql_string_types ) VALUES (@c_char, @c_nchar, @c_national_char, @c_varchar, @c_tinytext, @c_mediumtext, @c_text, @c_longtext, @c_json, @c_json_string_override, @c_enum, @c_set)"; public readonly record struct InsertMysqlStringTypesArgs(string? CChar, string? CNchar, string? CNationalChar, string? CVarchar, string? CTinytext, string? CMediumtext, string? CText, string? CLongtext, JsonElement? CJson, string? CJsonStringOverride, MysqlStringTypesCEnum? CEnum, HashSet? CSet); - public async Task InsertMysqlStringTypes(InsertMysqlStringTypesArgs args) + public async Task InsertMysqlStringTypesAsync(InsertMysqlStringTypesArgs args) { if (this.Transaction == null) { @@ -1178,7 +1178,7 @@ public async Task InsertMysqlStringTypes(InsertMysqlStringTypesArgs args) } public readonly record struct InsertMysqlStringTypesBatchArgs(string? CChar, string? CNchar, string? CNationalChar, string? CVarchar, string? CTinytext, string? CMediumtext, string? CText, string? CLongtext, JsonElement? CJson, string? CJsonStringOverride, MysqlStringTypesCEnum? CEnum, HashSet? CSet); - public async Task InsertMysqlStringTypesBatch(List args) + public async Task InsertMysqlStringTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -1229,7 +1229,7 @@ public async Task InsertMysqlStringTypesBatch(List? CSet); - public async Task GetMysqlStringTypes() + public async Task GetMysqlStringTypesAsync() { if (this.Transaction == null) { @@ -1327,7 +1327,7 @@ GROUP BY c_set LIMIT 1"; public readonly record struct GetMysqlStringTypesCntRow(long Cnt, string? CChar, string? CNchar, string? CNationalChar, string? CVarchar, string? CTinytext, string? CMediumtext, string? CText, string? CLongtext, JsonElement? CJson, string? CJsonStringOverride, MysqlStringTypesCEnum? CEnum, HashSet? CSet); - public async Task GetMysqlStringTypesCnt() + public async Task GetMysqlStringTypesCntAsync() { if (this.Transaction == null) { @@ -1398,7 +1398,7 @@ GROUP BY } private const string TruncateMysqlStringTypesSql = "TRUNCATE TABLE mysql_string_types"; - public async Task TruncateMysqlStringTypes() + public async Task TruncateMysqlStringTypesAsync() { if (this.Transaction == null) { @@ -1436,7 +1436,7 @@ INSERT INTO mysql_datetime_types ) VALUES (@c_year, @c_date, @c_datetime, @c_timestamp, @c_time, @c_timestamp_noda_instant_override)"; public readonly record struct InsertMysqlDatetimeTypesArgs(short? CYear, DateTime? CDate, DateTime? CDatetime, DateTime? CTimestamp, TimeSpan? CTime, Instant? CTimestampNodaInstantOverride); - public async Task InsertMysqlDatetimeTypes(InsertMysqlDatetimeTypesArgs args) + public async Task InsertMysqlDatetimeTypesAsync(InsertMysqlDatetimeTypesArgs args) { if (this.Transaction == null) { @@ -1475,7 +1475,7 @@ public async Task InsertMysqlDatetimeTypes(InsertMysqlDatetimeTypesArgs args) } public readonly record struct InsertMysqlDatetimeTypesBatchArgs(short? CYear, DateTime? CDate, DateTime? CDatetime, DateTime? CTimestamp, TimeSpan? CTime); - public async Task InsertMysqlDatetimeTypesBatch(List args) + public async Task InsertMysqlDatetimeTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -1524,7 +1524,7 @@ public async Task InsertMysqlDatetimeTypesBatch(List GetMysqlDatetimeTypes() + public async Task GetMysqlDatetimeTypesAsync() { if (this.Transaction == null) { @@ -1608,7 +1608,7 @@ GROUP BY c_time LIMIT 1"; public readonly record struct GetMysqlDatetimeTypesCntRow(long Cnt, short? CYear, DateTime? CDate, DateTime? CDatetime, DateTime? CTimestamp, TimeSpan? CTime); - public async Task GetMysqlDatetimeTypesCnt() + public async Task GetMysqlDatetimeTypesCntAsync() { if (this.Transaction == null) { @@ -1665,7 +1665,7 @@ GROUP BY } private const string TruncateMysqlDatetimeTypesSql = "TRUNCATE TABLE mysql_datetime_types"; - public async Task TruncateMysqlDatetimeTypes() + public async Task TruncateMysqlDatetimeTypesAsync() { if (this.Transaction == null) { @@ -1704,7 +1704,7 @@ INSERT INTO mysql_binary_types ) VALUES (@c_bit, @c_binary, @c_varbinary, @c_tinyblob, @c_blob, @c_mediumblob, @c_longblob)"; public readonly record struct InsertMysqlBinaryTypesArgs(byte? CBit, byte[]? CBinary, byte[]? CVarbinary, byte[]? CTinyblob, byte[]? CBlob, byte[]? CMediumblob, byte[]? CLongblob); - public async Task InsertMysqlBinaryTypes(InsertMysqlBinaryTypesArgs args) + public async Task InsertMysqlBinaryTypesAsync(InsertMysqlBinaryTypesArgs args) { if (this.Transaction == null) { @@ -1745,7 +1745,7 @@ public async Task InsertMysqlBinaryTypes(InsertMysqlBinaryTypesArgs args) } public readonly record struct InsertMysqlBinaryTypesBatchArgs(byte? CBit, byte[]? CBinary, byte[]? CVarbinary, byte[]? CTinyblob, byte[]? CBlob, byte[]? CMediumblob, byte[]? CLongblob); - public async Task InsertMysqlBinaryTypesBatch(List args) + public async Task InsertMysqlBinaryTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -1795,7 +1795,7 @@ public async Task InsertMysqlBinaryTypesBatch(List GetMysqlBinaryTypes() + public async Task GetMysqlBinaryTypesAsync() { if (this.Transaction == null) { @@ -1873,7 +1873,7 @@ GROUP BY c_longblob LIMIT 1"; public readonly record struct GetMysqlBinaryTypesCntRow(long Cnt, byte? CBit, byte[]? CBinary, byte[]? CVarbinary, byte[]? CTinyblob, byte[]? CBlob, byte[]? CMediumblob, byte[]? CLongblob); - public async Task GetMysqlBinaryTypesCnt() + public async Task GetMysqlBinaryTypesCntAsync() { if (this.Transaction == null) { @@ -1934,7 +1934,7 @@ GROUP BY } private const string TruncateMysqlBinaryTypesSql = "TRUNCATE TABLE mysql_binary_types"; - public async Task TruncateMysqlBinaryTypes() + public async Task TruncateMysqlBinaryTypesAsync() { if (this.Transaction == null) { @@ -1969,7 +1969,7 @@ FROM mysql_numeric_types CROSS JOIN mysql_string_types CROSS JOIN mysql_datetime_types"; public readonly record struct GetMysqlFunctionsRow(int? MaxInt, string? MaxVarchar, DateTime MaxTimestamp); - public async Task GetMysqlFunctions() + public async Task GetMysqlFunctionsAsync() { if (this.Transaction == null) { diff --git a/examples/MySqlConnectorExample/request.json b/examples/MySqlConnectorExample/request.json index 0416d559..d9cbf272 100644 --- a/examples/MySqlConnectorExample/request.json +++ b/examples/MySqlConnectorExample/request.json @@ -3807,5 +3807,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6Ik15U3FsQ29ubmVjdG9yRXhhbXBsZUdlbiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6W3siY29sdW1uIjoiR2V0TXlzcWxGdW5jdGlvbnM6bWF4X2ludCIsImNzaGFycF90eXBlIjp7InR5cGUiOiJpbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0TXlzcWxGdW5jdGlvbnM6bWF4X3ZhcmNoYXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldE15c3FsRnVuY3Rpb25zOm1heF90aW1lc3RhbXAiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiRGF0ZVRpbWUiLCJub3ROdWxsIjp0cnVlfX0seyJjb2x1bW4iOiIqOmNfanNvbl9zdHJpbmdfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190aW1lc3RhbXBfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19XSwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZX0=" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6Ik15U3FsQ29ubmVjdG9yRXhhbXBsZUdlbiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6W3siY29sdW1uIjoiR2V0TXlzcWxGdW5jdGlvbnM6bWF4X2ludCIsImNzaGFycF90eXBlIjp7InR5cGUiOiJpbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0TXlzcWxGdW5jdGlvbnM6bWF4X3ZhcmNoYXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldE15c3FsRnVuY3Rpb25zOm1heF90aW1lc3RhbXAiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiRGF0ZVRpbWUiLCJub3ROdWxsIjp0cnVlfX0seyJjb2x1bW4iOiIqOmNfanNvbl9zdHJpbmdfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190aW1lc3RhbXBfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19XSwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZSwid2l0aEFzeW5jU3VmZml4Ijp0cnVlfQ==" } \ No newline at end of file diff --git a/examples/MySqlConnectorExample/request.message b/examples/MySqlConnectorExample/request.message index 00f6db889113c9dabb33f9b38949a01b46736b70..97fd7f7567dd960e66f1d1bf79b70e26a503ea06 100644 GIT binary patch delta 41 xcmex(ma*d;;|9AF#uJy5NQAa delta 18 acmeA;$N2Fq;|9AF#*LfpQ#LX&)&c-f!3UxM diff --git a/examples/MySqlConnectorLegacyExample/QuerySql.cs b/examples/MySqlConnectorLegacyExample/QuerySql.cs index 775f5884..3285f3eb 100644 --- a/examples/MySqlConnectorLegacyExample/QuerySql.cs +++ b/examples/MySqlConnectorLegacyExample/QuerySql.cs @@ -55,7 +55,7 @@ public class GetAuthorArgs { public string Name { get; set; } }; - public async Task GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { if (this.Transaction == null) { @@ -122,7 +122,7 @@ public class ListAuthorsArgs public int Limit { get; set; } public int Offset { get; set; } }; - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { if (this.Transaction == null) { @@ -169,7 +169,7 @@ public class CreateAuthorArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { if (this.Transaction == null) { @@ -207,7 +207,7 @@ public class CreateAuthorReturnIdArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { if (this.Transaction == null) { @@ -248,7 +248,7 @@ public class GetAuthorByIdArgs { public long Id { get; set; } }; - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { if (this.Transaction == null) { @@ -312,7 +312,7 @@ public class GetAuthorByNamePatternArgs { public string NamePattern { get; set; } }; - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { if (this.Transaction == null) { @@ -356,7 +356,7 @@ public class DeleteAuthorArgs { public string Name { get; set; } }; - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { if (this.Transaction == null) { @@ -385,7 +385,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) } private const string DeleteAllAuthorsSql = "DELETE FROM authors"; - public async Task DeleteAllAuthors() + public async Task DeleteAllAuthorsAsync() { if (this.Transaction == null) { @@ -418,7 +418,7 @@ public class UpdateAuthorsArgs { public string Bio { get; set; } }; - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { if (this.Transaction == null) { @@ -455,7 +455,7 @@ public class GetAuthorsByIdsArgs { public long[] Ids { get; set; } }; - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var transformedSql = GetAuthorsByIdsSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -509,7 +509,7 @@ public class GetAuthorsByIdsAndNamesArgs public long[] Ids { get; set; } public string[] Names { get; set; } }; - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var transformedSql = GetAuthorsByIdsAndNamesSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -562,7 +562,7 @@ public class CreateBookArgs public string Name { get; set; } public long AuthorId { get; set; } }; - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { if (this.Transaction == null) { @@ -600,7 +600,7 @@ public class ListAllAuthorsBooksRow public Author Author { get; set; } public Book Book { get; set; } }; - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -644,7 +644,7 @@ public class GetDuplicateAuthorsRow public Author Author { get; set; } public Author Author2 { get; set; } }; - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -694,7 +694,7 @@ public class GetAuthorsByBookNameArgs { public string Name { get; set; } }; - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -740,7 +740,7 @@ public class CreateExtendedBioArgs public BiosBioType? BioType { get; set; } public HashSet AuthorType { get; set; } }; - public async Task CreateExtendedBio(CreateExtendedBioArgs args) + public async Task CreateExtendedBioAsync(CreateExtendedBioArgs args) { if (this.Transaction == null) { @@ -786,7 +786,7 @@ public class GetFirstExtendedBioByTypeArgs { public BiosBioType? BioType { get; set; } }; - public async Task GetFirstExtendedBioByType(GetFirstExtendedBioByTypeArgs args) + public async Task GetFirstExtendedBioByTypeAsync(GetFirstExtendedBioByTypeArgs args) { if (this.Transaction == null) { @@ -841,7 +841,7 @@ public async Task GetFirstExtendedBioByType(GetFir } private const string TruncateExtendedBiosSql = "TRUNCATE TABLE extended.bios"; - public async Task TruncateExtendedBios() + public async Task TruncateExtendedBiosAsync() { if (this.Transaction == null) { @@ -905,7 +905,7 @@ public class InsertMysqlNumericTypesArgs public double? CDouble { get; set; } public double? CDoublePrecision { get; set; } }; - public async Task InsertMysqlNumericTypes(InsertMysqlNumericTypesArgs args) + public async Task InsertMysqlNumericTypesAsync(InsertMysqlNumericTypesArgs args) { if (this.Transaction == null) { @@ -979,7 +979,7 @@ public class InsertMysqlNumericTypesBatchArgs public double? CDouble { get; set; } public double? CDoublePrecision { get; set; } }; - public async Task InsertMysqlNumericTypesBatch(List args) + public async Task InsertMysqlNumericTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -1049,7 +1049,7 @@ public class GetMysqlNumericTypesRow public double? CDouble { get; set; } public double? CDoublePrecision { get; set; } }; - public async Task GetMysqlNumericTypes() + public async Task GetMysqlNumericTypesAsync() { if (this.Transaction == null) { @@ -1177,7 +1177,7 @@ public class GetMysqlNumericTypesCntRow public double? CDouble { get; set; } public double? CDoublePrecision { get; set; } }; - public async Task GetMysqlNumericTypesCnt() + public async Task GetMysqlNumericTypesCntAsync() { if (this.Transaction == null) { @@ -1254,7 +1254,7 @@ public async Task GetMysqlNumericTypesCnt() } private const string TruncateMysqlNumericTypesSql = "TRUNCATE TABLE mysql_numeric_types"; - public async Task TruncateMysqlNumericTypes() + public async Task TruncateMysqlNumericTypesAsync() { if (this.Transaction == null) { @@ -1312,7 +1312,7 @@ public class InsertMysqlStringTypesArgs public MysqlStringTypesCEnum? CEnum { get; set; } public HashSet CSet { get; set; } }; - public async Task InsertMysqlStringTypes(InsertMysqlStringTypesArgs args) + public async Task InsertMysqlStringTypesAsync(InsertMysqlStringTypesArgs args) { if (this.Transaction == null) { @@ -1377,7 +1377,7 @@ public class InsertMysqlStringTypesBatchArgs public MysqlStringTypesCEnum? CEnum { get; set; } public HashSet CSet { get; set; } }; - public async Task InsertMysqlStringTypesBatch(List args) + public async Task InsertMysqlStringTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -1441,7 +1441,7 @@ public class GetMysqlStringTypesRow public MysqlStringTypesCEnum? CEnum { get; set; } public HashSet CSet { get; set; } }; - public async Task GetMysqlStringTypes() + public async Task GetMysqlStringTypesAsync() { if (this.Transaction == null) { @@ -1554,7 +1554,7 @@ public class GetMysqlStringTypesCntRow public MysqlStringTypesCEnum? CEnum { get; set; } public HashSet CSet { get; set; } }; - public async Task GetMysqlStringTypesCnt() + public async Task GetMysqlStringTypesCntAsync() { if (this.Transaction == null) { @@ -1625,7 +1625,7 @@ public async Task GetMysqlStringTypesCnt() } private const string TruncateMysqlStringTypesSql = "TRUNCATE TABLE mysql_string_types"; - public async Task TruncateMysqlStringTypes() + public async Task TruncateMysqlStringTypesAsync() { if (this.Transaction == null) { @@ -1671,7 +1671,7 @@ public class InsertMysqlDatetimeTypesArgs public TimeSpan? CTime { get; set; } public Instant? CTimestampNodaInstantOverride { get; set; } }; - public async Task InsertMysqlDatetimeTypes(InsertMysqlDatetimeTypesArgs args) + public async Task InsertMysqlDatetimeTypesAsync(InsertMysqlDatetimeTypesArgs args) { if (this.Transaction == null) { @@ -1717,7 +1717,7 @@ public class InsertMysqlDatetimeTypesBatchArgs public DateTime? CTimestamp { get; set; } public TimeSpan? CTime { get; set; } }; - public async Task InsertMysqlDatetimeTypesBatch(List args) + public async Task InsertMysqlDatetimeTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -1774,7 +1774,7 @@ public class GetMysqlDatetimeTypesRow public TimeSpan? CTime { get; set; } public Instant? CTimestampNodaInstantOverride { get; set; } }; - public async Task GetMysqlDatetimeTypes() + public async Task GetMysqlDatetimeTypesAsync() { if (this.Transaction == null) { @@ -1866,7 +1866,7 @@ public class GetMysqlDatetimeTypesCntRow public DateTime? CTimestamp { get; set; } public TimeSpan? CTime { get; set; } }; - public async Task GetMysqlDatetimeTypesCnt() + public async Task GetMysqlDatetimeTypesCntAsync() { if (this.Transaction == null) { @@ -1923,7 +1923,7 @@ public async Task GetMysqlDatetimeTypesCnt() } private const string TruncateMysqlDatetimeTypesSql = "TRUNCATE TABLE mysql_datetime_types"; - public async Task TruncateMysqlDatetimeTypes() + public async Task TruncateMysqlDatetimeTypesAsync() { if (this.Transaction == null) { @@ -1971,7 +1971,7 @@ public class InsertMysqlBinaryTypesArgs public byte[] CMediumblob { get; set; } public byte[] CLongblob { get; set; } }; - public async Task InsertMysqlBinaryTypes(InsertMysqlBinaryTypesArgs args) + public async Task InsertMysqlBinaryTypesAsync(InsertMysqlBinaryTypesArgs args) { if (this.Transaction == null) { @@ -2021,7 +2021,7 @@ public class InsertMysqlBinaryTypesBatchArgs public byte[] CMediumblob { get; set; } public byte[] CLongblob { get; set; } }; - public async Task InsertMysqlBinaryTypesBatch(List args) + public async Task InsertMysqlBinaryTypesBatchAsync(List args) { const string supportedDateTimeFormat = "yyyy-MM-dd H:mm:ss"; var config = new CsvConfiguration(CultureInfo.CurrentCulture) @@ -2079,7 +2079,7 @@ public class GetMysqlBinaryTypesRow public byte[] CMediumblob { get; set; } public byte[] CLongblob { get; set; } }; - public async Task GetMysqlBinaryTypes() + public async Task GetMysqlBinaryTypesAsync() { if (this.Transaction == null) { @@ -2167,7 +2167,7 @@ public class GetMysqlBinaryTypesCntRow public byte[] CMediumblob { get; set; } public byte[] CLongblob { get; set; } }; - public async Task GetMysqlBinaryTypesCnt() + public async Task GetMysqlBinaryTypesCntAsync() { if (this.Transaction == null) { @@ -2228,7 +2228,7 @@ public async Task GetMysqlBinaryTypesCnt() } private const string TruncateMysqlBinaryTypesSql = "TRUNCATE TABLE mysql_binary_types"; - public async Task TruncateMysqlBinaryTypes() + public async Task TruncateMysqlBinaryTypesAsync() { if (this.Transaction == null) { @@ -2268,7 +2268,7 @@ public class GetMysqlFunctionsRow public string MaxVarchar { get; set; } public DateTime MaxTimestamp { get; set; } }; - public async Task GetMysqlFunctions() + public async Task GetMysqlFunctionsAsync() { if (this.Transaction == null) { diff --git a/examples/MySqlConnectorLegacyExample/request.json b/examples/MySqlConnectorLegacyExample/request.json index 25f4b83f..2f441ef9 100644 --- a/examples/MySqlConnectorLegacyExample/request.json +++ b/examples/MySqlConnectorLegacyExample/request.json @@ -3807,5 +3807,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiTXlTcWxDb25uZWN0b3JMZWdhY3lFeGFtcGxlR2VuIiwidXNlRGFwcGVyIjpmYWxzZSwib3ZlcnJpZGVEYXBwZXJWZXJzaW9uIjoiIiwib3ZlcnJpZGVzIjpbeyJjb2x1bW4iOiJHZXRNeXNxbEZ1bmN0aW9uczptYXhfaW50IiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImludCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRNeXNxbEZ1bmN0aW9uczptYXhfdmFyY2hhciIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0TXlzcWxGdW5jdGlvbnM6bWF4X3RpbWVzdGFtcCIsImNzaGFycF90eXBlIjp7InR5cGUiOiJEYXRlVGltZSIsIm5vdE51bGwiOnRydWV9fSx7ImNvbHVtbiI6Iio6Y19qc29uX3N0cmluZ19vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RpbWVzdGFtcF9ub2RhX2luc3RhbnRfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSW5zdGFudCIsIm5vdE51bGwiOmZhbHNlfX1dLCJkZWJ1Z1JlcXVlc3QiOmZhbHNlLCJ1c2VDZW50cmFsUGFja2FnZU1hbmFnZW1lbnQiOmZhbHNlfQ==" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiTXlTcWxDb25uZWN0b3JMZWdhY3lFeGFtcGxlR2VuIiwidXNlRGFwcGVyIjpmYWxzZSwib3ZlcnJpZGVEYXBwZXJWZXJzaW9uIjoiIiwib3ZlcnJpZGVzIjpbeyJjb2x1bW4iOiJHZXRNeXNxbEZ1bmN0aW9uczptYXhfaW50IiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImludCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRNeXNxbEZ1bmN0aW9uczptYXhfdmFyY2hhciIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0TXlzcWxGdW5jdGlvbnM6bWF4X3RpbWVzdGFtcCIsImNzaGFycF90eXBlIjp7InR5cGUiOiJEYXRlVGltZSIsIm5vdE51bGwiOnRydWV9fSx7ImNvbHVtbiI6Iio6Y19qc29uX3N0cmluZ19vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RpbWVzdGFtcF9ub2RhX2luc3RhbnRfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSW5zdGFudCIsIm5vdE51bGwiOmZhbHNlfX1dLCJkZWJ1Z1JlcXVlc3QiOmZhbHNlLCJ1c2VDZW50cmFsUGFja2FnZU1hbmFnZW1lbnQiOmZhbHNlLCJ3aXRoQXN5bmNTdWZmaXgiOnRydWV9" } \ No newline at end of file diff --git a/examples/MySqlConnectorLegacyExample/request.message b/examples/MySqlConnectorLegacyExample/request.message index 443fcee324d15659efdb6a5e08d65a426754b4de..9c17d9c4bd14584db6dc02edc89715448d001ae8 100644 GIT binary patch delta 41 xcmbPyj&apF#tlI!jMp{?r|f5v&`~PSEXi;zuFOjgE=^0ztWdHlDJo5^1psCc5OM$j delta 18 acmZ2=j&bri#tlI!jQckSr|f59tOWp1tp}?B diff --git a/examples/NpgsqlDapperExample/QuerySql.cs b/examples/NpgsqlDapperExample/QuerySql.cs index 5d653873..52f6bf44 100644 --- a/examples/NpgsqlDapperExample/QuerySql.cs +++ b/examples/NpgsqlDapperExample/QuerySql.cs @@ -57,7 +57,7 @@ public class GetAuthorArgs { public required string Name { get; init; } }; - public async Task GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -91,7 +91,7 @@ public class ListAuthorsArgs public required int Offset { get; init; } public required int Limit { get; init; } }; - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("offset", args.Offset); @@ -123,7 +123,7 @@ public class CreateAuthorArgs public required string Name { get; init; } public string? Bio { get; init; } }; - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -153,7 +153,7 @@ public class CreateAuthorReturnIdArgs public required string Name { get; init; } public string? Bio { get; init; } }; - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -181,7 +181,7 @@ public class GetAuthorByIdArgs { public required long Id { get; init; } }; - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -211,7 +211,7 @@ public class GetAuthorByNamePatternArgs { public string? NamePattern { get; init; } }; - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { var queryParams = new Dictionary(); queryParams.Add("name_pattern", args.NamePattern); @@ -235,7 +235,7 @@ public class DeleteAuthorArgs { public required string Name { get; init; } }; - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -252,7 +252,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) } private const string TruncateAuthorsSql = "TRUNCATE TABLE authors CASCADE"; - public async Task TruncateAuthors() + public async Task TruncateAuthorsAsync() { if (this.Transaction == null) { @@ -273,7 +273,7 @@ public class UpdateAuthorsArgs { public string? Bio { get; init; } }; - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("bio", args.Bio); @@ -300,7 +300,7 @@ public class GetAuthorsByIdsArgs { public required long[] LongArr1 { get; init; } }; - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var queryParams = new Dictionary(); queryParams.Add("longArr_1", args.LongArr1); @@ -332,7 +332,7 @@ public class GetAuthorsByIdsAndNamesArgs public required long[] LongArr1 { get; init; } public required string[] StringArr2 { get; init; } }; - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var queryParams = new Dictionary(); queryParams.Add("longArr_1", args.LongArr1); @@ -361,7 +361,7 @@ public class CreateBookArgs public required string Name { get; init; } public required long AuthorId { get; init; } }; - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -388,7 +388,7 @@ public class ListAllAuthorsBooksRow public required Author? Author { get; init; } public required Book? Book { get; init; } }; - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -434,7 +434,7 @@ public class GetDuplicateAuthorsRow public required Author? Author { get; init; } public required Author? Author2 { get; init; } }; - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -485,7 +485,7 @@ public class GetAuthorsByBookNameArgs { public required string Name { get; init; } }; - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -529,7 +529,7 @@ public class CreateExtendedBioArgs public required string Name { get; init; } public ExtendedBioType? BioType { get; init; } }; - public async Task CreateExtendedBio(CreateExtendedBioArgs args) + public async Task CreateExtendedBioAsync(CreateExtendedBioArgs args) { var queryParams = new Dictionary(); queryParams.Add("author_name", args.AuthorName); @@ -558,7 +558,7 @@ public class GetFirstExtendedBioByTypeArgs { public ExtendedBioType? BioType { get; init; } }; - public async Task GetFirstExtendedBioByType(GetFirstExtendedBioByTypeArgs args) + public async Task GetFirstExtendedBioByTypeAsync(GetFirstExtendedBioByTypeArgs args) { var queryParams = new Dictionary(); queryParams.Add("bio_type", args.BioType != null ? args.BioType.Value.Stringify() : null); @@ -577,7 +577,7 @@ public class GetFirstExtendedBioByTypeArgs } private const string TruncateExtendedBiosSql = "TRUNCATE TABLE extended.bios"; - public async Task TruncateExtendedBios() + public async Task TruncateExtendedBiosAsync() { if (this.Transaction == null) { @@ -604,7 +604,7 @@ public class GetPostgresFunctionsRow public string? MaxVarchar { get; init; } public required DateTime MaxTimestamp { get; init; } }; - public async Task GetPostgresFunctions() + public async Task GetPostgresFunctionsAsync() { if (this.Transaction == null) { @@ -648,7 +648,7 @@ public class InsertPostgresNumericTypesArgs public double? CDoublePrecision { get; init; } public decimal? CMoney { get; init; } }; - public async Task InsertPostgresNumericTypes(InsertPostgresNumericTypesArgs args) + public async Task InsertPostgresNumericTypesAsync(InsertPostgresNumericTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_boolean", args.CBoolean); @@ -687,7 +687,7 @@ public class GetPostgresNumericTypesRow public double? CDoublePrecision { get; init; } public decimal? CMoney { get; init; } }; - public async Task GetPostgresNumericTypes() + public async Task GetPostgresNumericTypesAsync() { if (this.Transaction == null) { @@ -704,7 +704,7 @@ public class GetPostgresNumericTypesRow } private const string TruncatePostgresNumericTypesSql = "TRUNCATE TABLE postgres_numeric_types"; - public async Task TruncatePostgresNumericTypes() + public async Task TruncatePostgresNumericTypesAsync() { if (this.Transaction == null) { @@ -757,7 +757,7 @@ public class GetPostgresNumericTypesCntRow public decimal? CMoney { get; init; } public required long Cnt { get; init; } }; - public async Task GetPostgresNumericTypesCnt() + public async Task GetPostgresNumericTypesCntAsync() { if (this.Transaction == null) { @@ -787,7 +787,7 @@ public class InsertPostgresNumericTypesBatchArgs public double? CDoublePrecision { get; init; } public decimal? CMoney { get; init; } }; - public async Task InsertPostgresNumericTypesBatch(List args) + public async Task InsertPostgresNumericTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -834,7 +834,7 @@ public class InsertPostgresStringTypesArgs public string? CBpchar { get; init; } public string? CText { get; init; } }; - public async Task InsertPostgresStringTypes(InsertPostgresStringTypesArgs args) + public async Task InsertPostgresStringTypesAsync(InsertPostgresStringTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_char", args.CChar); @@ -863,7 +863,7 @@ public class InsertPostgresStringTypesBatchArgs public string? CBpchar { get; init; } public string? CText { get; init; } }; - public async Task InsertPostgresStringTypesBatch(List args) + public async Task InsertPostgresStringTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -896,7 +896,7 @@ public class GetPostgresStringTypesRow public string? CBpchar { get; init; } public string? CText { get; init; } }; - public async Task GetPostgresStringTypes() + public async Task GetPostgresStringTypesAsync() { if (this.Transaction == null) { @@ -913,7 +913,7 @@ public class GetPostgresStringTypesRow } private const string TruncatePostgresStringTypesSql = "TRUNCATE TABLE postgres_string_types"; - public async Task TruncatePostgresStringTypes() + public async Task TruncatePostgresStringTypesAsync() { if (this.Transaction == null) { @@ -951,7 +951,7 @@ public class GetPostgresStringTypesCntRow public string? CText { get; init; } public required long Cnt { get; init; } }; - public async Task GetPostgresStringTypesCnt() + public async Task GetPostgresStringTypesCntAsync() { if (this.Transaction == null) { @@ -991,7 +991,7 @@ public class GetPostgresStringTypesTextSearchArgs { public required string ToTsquery { get; init; } }; - public async Task GetPostgresStringTypesTextSearch(GetPostgresStringTypesTextSearchArgs args) + public async Task GetPostgresStringTypesTextSearchAsync(GetPostgresStringTypesTextSearchArgs args) { var queryParams = new Dictionary(); queryParams.Add("to_tsquery", args.ToTsquery); @@ -1028,7 +1028,7 @@ public class InsertPostgresDateTimeTypesArgs public TimeSpan? CInterval { get; init; } public Instant? CTimestampNodaInstantOverride { get; init; } }; - public async Task InsertPostgresDateTimeTypes(InsertPostgresDateTimeTypesArgs args) + public async Task InsertPostgresDateTimeTypesAsync(InsertPostgresDateTimeTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_date", args.CDate); @@ -1059,7 +1059,7 @@ public class GetPostgresDateTimeTypesRow public TimeSpan? CInterval { get; init; } public Instant? CTimestampNodaInstantOverride { get; init; } }; - public async Task GetPostgresDateTimeTypes() + public async Task GetPostgresDateTimeTypesAsync() { if (this.Transaction == null) { @@ -1076,7 +1076,7 @@ public class GetPostgresDateTimeTypesRow } private const string TruncatePostgresDateTimeTypesSql = "TRUNCATE TABLE postgres_datetime_types"; - public async Task TruncatePostgresDateTimeTypes() + public async Task TruncatePostgresDateTimeTypesAsync() { if (this.Transaction == null) { @@ -1114,7 +1114,7 @@ public class GetPostgresDateTimeTypesCntRow public TimeSpan? CInterval { get; init; } public required long Cnt { get; init; } }; - public async Task GetPostgresDateTimeTypesCnt() + public async Task GetPostgresDateTimeTypesCntAsync() { if (this.Transaction == null) { @@ -1139,7 +1139,7 @@ public class InsertPostgresDateTimeTypesBatchArgs public DateTime? CTimestampWithTz { get; init; } public TimeSpan? CInterval { get; init; } }; - public async Task InsertPostgresDateTimeTypesBatch(List args) + public async Task InsertPostgresDateTimeTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1183,7 +1183,7 @@ public class InsertPostgresNetworkTypesArgs public PhysicalAddress? CMacaddr { get; init; } public string? CMacaddr8 { get; init; } }; - public async Task InsertPostgresNetworkTypes(InsertPostgresNetworkTypesArgs args) + public async Task InsertPostgresNetworkTypesAsync(InsertPostgresNetworkTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_cidr", args.CCidr); @@ -1216,7 +1216,7 @@ public class GetPostgresNetworkTypesRow public PhysicalAddress? CMacaddr { get; init; } public string? CMacaddr8 { get; init; } }; - public async Task GetPostgresNetworkTypes() + public async Task GetPostgresNetworkTypesAsync() { if (this.Transaction == null) { @@ -1233,7 +1233,7 @@ public class GetPostgresNetworkTypesRow } private const string TruncatePostgresNetworkTypesSql = "TRUNCATE TABLE postgres_network_types"; - public async Task TruncatePostgresNetworkTypes() + public async Task TruncatePostgresNetworkTypesAsync() { if (this.Transaction == null) { @@ -1265,7 +1265,7 @@ public class GetPostgresNetworkTypesCntRow public PhysicalAddress? CMacaddr { get; init; } public required long Cnt { get; init; } }; - public async Task GetPostgresNetworkTypesCnt() + public async Task GetPostgresNetworkTypesCntAsync() { if (this.Transaction == null) { @@ -1288,7 +1288,7 @@ public class InsertPostgresNetworkTypesBatchArgs public IPAddress? CInet { get; init; } public PhysicalAddress? CMacaddr { get; init; } }; - public async Task InsertPostgresNetworkTypesBatch(List args) + public async Task InsertPostgresNetworkTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1343,7 +1343,7 @@ public class InsertPostgresSpecialTypesArgs public Guid? CUuid { get; init; } public CEnum? CEnum { get; init; } }; - public async Task InsertPostgresSpecialTypes(InsertPostgresSpecialTypesArgs args) + public async Task InsertPostgresSpecialTypesAsync(InsertPostgresSpecialTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_json", args.CJson.HasValue ? (object)args.CJson.Value : null); @@ -1377,7 +1377,7 @@ public class InsertPostgresNotNullTypesArgs { public required CEnum CEnumNotNull { get; init; } }; - public async Task InsertPostgresNotNullTypes(InsertPostgresNotNullTypesArgs args) + public async Task InsertPostgresNotNullTypesAsync(InsertPostgresNotNullTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_enum_not_null", args.CEnumNotNull.Stringify()); @@ -1401,7 +1401,7 @@ public class GetPostgresNotNullTypesRow { public required CEnum CEnumNotNull { get; init; } }; - public async Task GetPostgresNotNullTypes() + public async Task GetPostgresNotNullTypesAsync() { if (this.Transaction == null) { @@ -1418,7 +1418,7 @@ public class GetPostgresNotNullTypesRow } private const string TruncatePostgresNotNullTypesSql = "TRUNCATE TABLE postgres_not_null_types"; - public async Task TruncatePostgresNotNullTypes() + public async Task TruncatePostgresNotNullTypesAsync() { if (this.Transaction == null) { @@ -1454,7 +1454,7 @@ public class GetPostgresSpecialTypesRow public Guid? CUuid { get; init; } public CEnum? CEnum { get; init; } }; - public async Task GetPostgresSpecialTypes() + public async Task GetPostgresSpecialTypesAsync() { if (this.Transaction == null) { @@ -1471,7 +1471,7 @@ public class GetPostgresSpecialTypesRow } private const string TruncatePostgresSpecialTypesSql = "TRUNCATE TABLE postgres_special_types"; - public async Task TruncatePostgresSpecialTypes() + public async Task TruncatePostgresSpecialTypesAsync() { if (this.Transaction == null) { @@ -1492,7 +1492,7 @@ public class InsertPostgresSpecialTypesBatchArgs public JsonElement? CJson { get; init; } public JsonElement? CJsonb { get; init; } }; - public async Task InsertPostgresSpecialTypesBatch(List args) + public async Task InsertPostgresSpecialTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1541,7 +1541,7 @@ public class GetPostgresSpecialTypesCntRow public JsonElement? CJsonb { get; init; } public required long Cnt { get; init; } }; - public async Task GetPostgresSpecialTypesCnt() + public async Task GetPostgresSpecialTypesCntAsync() { if (this.Transaction == null) { @@ -1579,7 +1579,7 @@ public class InsertPostgresArrayTypesArgs public DateTime[]? CDateArray { get; init; } public DateTime[]? CTimestampArray { get; init; } }; - public async Task InsertPostgresArrayTypes(InsertPostgresArrayTypesArgs args) + public async Task InsertPostgresArrayTypesAsync(InsertPostgresArrayTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_bytea", args.CBytea); @@ -1612,7 +1612,7 @@ public class GetPostgresArrayTypesRow public DateTime[]? CDateArray { get; init; } public DateTime[]? CTimestampArray { get; init; } }; - public async Task GetPostgresArrayTypes() + public async Task GetPostgresArrayTypesAsync() { if (this.Transaction == null) { @@ -1638,7 +1638,7 @@ public class InsertPostgresArrayTypesBatchArgs public decimal[]? CDecimalArray { get; init; } public DateTime[]? CTimestampArray { get; init; } }; - public async Task InsertPostgresArrayTypesBatch(List args) + public async Task InsertPostgresArrayTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1690,7 +1690,7 @@ public class GetPostgresArrayTypesCntRow public DateTime[]? CTimestampArray { get; init; } public required long Cnt { get; init; } }; - public async Task GetPostgresArrayTypesCnt() + public async Task GetPostgresArrayTypesCntAsync() { if (this.Transaction == null) { @@ -1707,7 +1707,7 @@ public class GetPostgresArrayTypesCntRow } private const string TruncatePostgresArrayTypesSql = "TRUNCATE TABLE postgres_array_types"; - public async Task TruncatePostgresArrayTypes() + public async Task TruncatePostgresArrayTypesAsync() { if (this.Transaction == null) { @@ -1742,7 +1742,7 @@ public class InsertPostgresGeoTypesArgs public NpgsqlPolygon? CPolygon { get; init; } public NpgsqlCircle? CCircle { get; init; } }; - public async Task InsertPostgresGeoTypes(InsertPostgresGeoTypesArgs args) + public async Task InsertPostgresGeoTypesAsync(InsertPostgresGeoTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_point", args.CPoint); @@ -1775,7 +1775,7 @@ public class InsertPostgresGeoTypesBatchArgs public NpgsqlPolygon? CPolygon { get; init; } public NpgsqlCircle? CCircle { get; init; } }; - public async Task InsertPostgresGeoTypesBatch(List args) + public async Task InsertPostgresGeoTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1812,7 +1812,7 @@ public class GetPostgresGeoTypesRow public NpgsqlPolygon? CPolygon { get; init; } public NpgsqlCircle? CCircle { get; init; } }; - public async Task GetPostgresGeoTypes() + public async Task GetPostgresGeoTypesAsync() { if (this.Transaction == null) { @@ -1829,7 +1829,7 @@ public class GetPostgresGeoTypesRow } private const string TruncatePostgresGeoTypesSql = "TRUNCATE TABLE postgres_geometric_types"; - public async Task TruncatePostgresGeoTypes() + public async Task TruncatePostgresGeoTypesAsync() { if (this.Transaction == null) { diff --git a/examples/NpgsqlDapperExample/request.json b/examples/NpgsqlDapperExample/request.json index cda21a9e..5506c5e1 100644 --- a/examples/NpgsqlDapperExample/request.json +++ b/examples/NpgsqlDapperExample/request.json @@ -36232,5 +36232,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6Ik5wZ3NxbERhcHBlckV4YW1wbGVHZW4iLCJ1c2VEYXBwZXIiOnRydWUsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6W3siY29sdW1uIjoiR2V0UG9zdGdyZXNGdW5jdGlvbnM6bWF4X2ludGVnZXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiaW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFBvc3RncmVzRnVuY3Rpb25zOm1heF92YXJjaGFyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRQb3N0Z3Jlc0Z1bmN0aW9uczptYXhfdGltZXN0YW1wIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6dHJ1ZX19LHsiY29sdW1uIjoiR2V0UG9zdGdyZXNTcGVjaWFsVHlwZXNDbnQ6Y19qc29uIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikpzb25FbGVtZW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFBvc3RncmVzU3BlY2lhbFR5cGVzQ250OmNfanNvbmIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSnNvbkVsZW1lbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2pzb25fc3RyaW5nX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfeG1sX3N0cmluZ19vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX21hY2FkZHI4IiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGltZXN0YW1wX25vZGFfaW5zdGFudF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJJbnN0YW50Iiwibm90TnVsbCI6ZmFsc2V9fV0sImRlYnVnUmVxdWVzdCI6ZmFsc2UsInVzZUNlbnRyYWxQYWNrYWdlTWFuYWdlbWVudCI6ZmFsc2V9" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6Ik5wZ3NxbERhcHBlckV4YW1wbGVHZW4iLCJ1c2VEYXBwZXIiOnRydWUsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6W3siY29sdW1uIjoiR2V0UG9zdGdyZXNGdW5jdGlvbnM6bWF4X2ludGVnZXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiaW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFBvc3RncmVzRnVuY3Rpb25zOm1heF92YXJjaGFyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRQb3N0Z3Jlc0Z1bmN0aW9uczptYXhfdGltZXN0YW1wIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6dHJ1ZX19LHsiY29sdW1uIjoiR2V0UG9zdGdyZXNTcGVjaWFsVHlwZXNDbnQ6Y19qc29uIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikpzb25FbGVtZW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFBvc3RncmVzU3BlY2lhbFR5cGVzQ250OmNfanNvbmIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSnNvbkVsZW1lbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2pzb25fc3RyaW5nX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfeG1sX3N0cmluZ19vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX21hY2FkZHI4IiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGltZXN0YW1wX25vZGFfaW5zdGFudF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJJbnN0YW50Iiwibm90TnVsbCI6ZmFsc2V9fV0sImRlYnVnUmVxdWVzdCI6ZmFsc2UsInVzZUNlbnRyYWxQYWNrYWdlTWFuYWdlbWVudCI6ZmFsc2UsIndpdGhBc3luY1N1ZmZpeCI6dHJ1ZX0=" } \ No newline at end of file diff --git a/examples/NpgsqlDapperExample/request.message b/examples/NpgsqlDapperExample/request.message index 5bb39629..4f4573de 100644 --- a/examples/NpgsqlDapperExample/request.message +++ b/examples/NpgsqlDapperExample/request.message @@ -10917,4 +10917,4 @@ hSELECT c_point, c_line, c_lseg, c_box, c_path, c_polygon, c_circle FROM postgre c_path0ÿÿÿÿÿÿÿÿÿRpostgres_geometric_typesbpathzc_path"H c_polygon0ÿÿÿÿÿÿÿÿÿRpostgres_geometric_typesb polygonz c_polygon"E c_circle0ÿÿÿÿÿÿÿÿÿRpostgres_geometric_typesbcirclezc_circle: query.sqlU -'TRUNCATE TABLE postgres_geometric_typesTruncatePostgresGeoTypes:exec: query.sql"v1.30.0*£{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"net8.0","namespaceName":"NpgsqlDapperExampleGen","useDapper":true,"overrideDapperVersion":"","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}}],"debugRequest":false,"useCentralPackageManagement":false} \ No newline at end of file +'TRUNCATE TABLE postgres_geometric_typesTruncatePostgresGeoTypes:exec: query.sql"v1.30.0*º{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"net8.0","namespaceName":"NpgsqlDapperExampleGen","useDapper":true,"overrideDapperVersion":"","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}}],"debugRequest":false,"useCentralPackageManagement":false,"withAsyncSuffix":true} \ No newline at end of file diff --git a/examples/NpgsqlDapperLegacyExample/QuerySql.cs b/examples/NpgsqlDapperLegacyExample/QuerySql.cs index b4a1fd1a..7ffe9462 100644 --- a/examples/NpgsqlDapperLegacyExample/QuerySql.cs +++ b/examples/NpgsqlDapperLegacyExample/QuerySql.cs @@ -58,7 +58,7 @@ public class GetAuthorArgs { public string Name { get; set; } }; - public async Task GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -92,7 +92,7 @@ public class ListAuthorsArgs public int Offset { get; set; } public int Limit { get; set; } }; - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("offset", args.Offset); @@ -124,7 +124,7 @@ public class CreateAuthorArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -154,7 +154,7 @@ public class CreateAuthorReturnIdArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -182,7 +182,7 @@ public class GetAuthorByIdArgs { public long Id { get; set; } }; - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -212,7 +212,7 @@ public class GetAuthorByNamePatternArgs { public string NamePattern { get; set; } }; - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { var queryParams = new Dictionary(); queryParams.Add("name_pattern", args.NamePattern); @@ -236,7 +236,7 @@ public class DeleteAuthorArgs { public string Name { get; set; } }; - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -253,7 +253,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) } private const string TruncateAuthorsSql = "TRUNCATE TABLE authors CASCADE"; - public async Task TruncateAuthors() + public async Task TruncateAuthorsAsync() { if (this.Transaction == null) { @@ -274,7 +274,7 @@ public class UpdateAuthorsArgs { public string Bio { get; set; } }; - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("bio", args.Bio); @@ -301,7 +301,7 @@ public class GetAuthorsByIdsArgs { public long[] LongArr1 { get; set; } }; - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var queryParams = new Dictionary(); queryParams.Add("longArr_1", args.LongArr1); @@ -333,7 +333,7 @@ public class GetAuthorsByIdsAndNamesArgs public long[] LongArr1 { get; set; } public string[] StringArr2 { get; set; } }; - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var queryParams = new Dictionary(); queryParams.Add("longArr_1", args.LongArr1); @@ -362,7 +362,7 @@ public class CreateBookArgs public string Name { get; set; } public long AuthorId { get; set; } }; - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -389,7 +389,7 @@ public class ListAllAuthorsBooksRow public Author Author { get; set; } public Book Book { get; set; } }; - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -435,7 +435,7 @@ public class GetDuplicateAuthorsRow public Author Author { get; set; } public Author Author2 { get; set; } }; - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -486,7 +486,7 @@ public class GetAuthorsByBookNameArgs { public string Name { get; set; } }; - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -530,7 +530,7 @@ public class CreateExtendedBioArgs public string Name { get; set; } public ExtendedBioType? BioType { get; set; } }; - public async Task CreateExtendedBio(CreateExtendedBioArgs args) + public async Task CreateExtendedBioAsync(CreateExtendedBioArgs args) { var queryParams = new Dictionary(); queryParams.Add("author_name", args.AuthorName); @@ -559,7 +559,7 @@ public class GetFirstExtendedBioByTypeArgs { public ExtendedBioType? BioType { get; set; } }; - public async Task GetFirstExtendedBioByType(GetFirstExtendedBioByTypeArgs args) + public async Task GetFirstExtendedBioByTypeAsync(GetFirstExtendedBioByTypeArgs args) { var queryParams = new Dictionary(); queryParams.Add("bio_type", args.BioType != null ? args.BioType.Value.Stringify() : null); @@ -578,7 +578,7 @@ public async Task GetFirstExtendedBioByType(GetFir } private const string TruncateExtendedBiosSql = "TRUNCATE TABLE extended.bios"; - public async Task TruncateExtendedBios() + public async Task TruncateExtendedBiosAsync() { if (this.Transaction == null) { @@ -605,7 +605,7 @@ public class GetPostgresFunctionsRow public string MaxVarchar { get; set; } public DateTime MaxTimestamp { get; set; } }; - public async Task GetPostgresFunctions() + public async Task GetPostgresFunctionsAsync() { if (this.Transaction == null) { @@ -649,7 +649,7 @@ public class InsertPostgresNumericTypesArgs public double? CDoublePrecision { get; set; } public decimal? CMoney { get; set; } }; - public async Task InsertPostgresNumericTypes(InsertPostgresNumericTypesArgs args) + public async Task InsertPostgresNumericTypesAsync(InsertPostgresNumericTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_boolean", args.CBoolean); @@ -688,7 +688,7 @@ public class GetPostgresNumericTypesRow public double? CDoublePrecision { get; set; } public decimal? CMoney { get; set; } }; - public async Task GetPostgresNumericTypes() + public async Task GetPostgresNumericTypesAsync() { if (this.Transaction == null) { @@ -705,7 +705,7 @@ public async Task GetPostgresNumericTypes() } private const string TruncatePostgresNumericTypesSql = "TRUNCATE TABLE postgres_numeric_types"; - public async Task TruncatePostgresNumericTypes() + public async Task TruncatePostgresNumericTypesAsync() { if (this.Transaction == null) { @@ -758,7 +758,7 @@ public class GetPostgresNumericTypesCntRow public decimal? CMoney { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresNumericTypesCnt() + public async Task GetPostgresNumericTypesCntAsync() { if (this.Transaction == null) { @@ -788,7 +788,7 @@ public class InsertPostgresNumericTypesBatchArgs public double? CDoublePrecision { get; set; } public decimal? CMoney { get; set; } }; - public async Task InsertPostgresNumericTypesBatch(List args) + public async Task InsertPostgresNumericTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -835,7 +835,7 @@ public class InsertPostgresStringTypesArgs public string CBpchar { get; set; } public string CText { get; set; } }; - public async Task InsertPostgresStringTypes(InsertPostgresStringTypesArgs args) + public async Task InsertPostgresStringTypesAsync(InsertPostgresStringTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_char", args.CChar); @@ -864,7 +864,7 @@ public class InsertPostgresStringTypesBatchArgs public string CBpchar { get; set; } public string CText { get; set; } }; - public async Task InsertPostgresStringTypesBatch(List args) + public async Task InsertPostgresStringTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -897,7 +897,7 @@ public class GetPostgresStringTypesRow public string CBpchar { get; set; } public string CText { get; set; } }; - public async Task GetPostgresStringTypes() + public async Task GetPostgresStringTypesAsync() { if (this.Transaction == null) { @@ -914,7 +914,7 @@ public async Task GetPostgresStringTypes() } private const string TruncatePostgresStringTypesSql = "TRUNCATE TABLE postgres_string_types"; - public async Task TruncatePostgresStringTypes() + public async Task TruncatePostgresStringTypesAsync() { if (this.Transaction == null) { @@ -952,7 +952,7 @@ public class GetPostgresStringTypesCntRow public string CText { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresStringTypesCnt() + public async Task GetPostgresStringTypesCntAsync() { if (this.Transaction == null) { @@ -992,7 +992,7 @@ public class GetPostgresStringTypesTextSearchArgs { public string ToTsquery { get; set; } }; - public async Task GetPostgresStringTypesTextSearch(GetPostgresStringTypesTextSearchArgs args) + public async Task GetPostgresStringTypesTextSearchAsync(GetPostgresStringTypesTextSearchArgs args) { var queryParams = new Dictionary(); queryParams.Add("to_tsquery", args.ToTsquery); @@ -1029,7 +1029,7 @@ public class InsertPostgresDateTimeTypesArgs public TimeSpan? CInterval { get; set; } public Instant? CTimestampNodaInstantOverride { get; set; } }; - public async Task InsertPostgresDateTimeTypes(InsertPostgresDateTimeTypesArgs args) + public async Task InsertPostgresDateTimeTypesAsync(InsertPostgresDateTimeTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_date", args.CDate); @@ -1060,7 +1060,7 @@ public class GetPostgresDateTimeTypesRow public TimeSpan? CInterval { get; set; } public Instant? CTimestampNodaInstantOverride { get; set; } }; - public async Task GetPostgresDateTimeTypes() + public async Task GetPostgresDateTimeTypesAsync() { if (this.Transaction == null) { @@ -1077,7 +1077,7 @@ public async Task GetPostgresDateTimeTypes() } private const string TruncatePostgresDateTimeTypesSql = "TRUNCATE TABLE postgres_datetime_types"; - public async Task TruncatePostgresDateTimeTypes() + public async Task TruncatePostgresDateTimeTypesAsync() { if (this.Transaction == null) { @@ -1115,7 +1115,7 @@ public class GetPostgresDateTimeTypesCntRow public TimeSpan? CInterval { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresDateTimeTypesCnt() + public async Task GetPostgresDateTimeTypesCntAsync() { if (this.Transaction == null) { @@ -1140,7 +1140,7 @@ public class InsertPostgresDateTimeTypesBatchArgs public DateTime? CTimestampWithTz { get; set; } public TimeSpan? CInterval { get; set; } }; - public async Task InsertPostgresDateTimeTypesBatch(List args) + public async Task InsertPostgresDateTimeTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1184,7 +1184,7 @@ public class InsertPostgresNetworkTypesArgs public PhysicalAddress CMacaddr { get; set; } public string CMacaddr8 { get; set; } }; - public async Task InsertPostgresNetworkTypes(InsertPostgresNetworkTypesArgs args) + public async Task InsertPostgresNetworkTypesAsync(InsertPostgresNetworkTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_cidr", args.CCidr); @@ -1217,7 +1217,7 @@ public class GetPostgresNetworkTypesRow public PhysicalAddress CMacaddr { get; set; } public string CMacaddr8 { get; set; } }; - public async Task GetPostgresNetworkTypes() + public async Task GetPostgresNetworkTypesAsync() { if (this.Transaction == null) { @@ -1234,7 +1234,7 @@ public async Task GetPostgresNetworkTypes() } private const string TruncatePostgresNetworkTypesSql = "TRUNCATE TABLE postgres_network_types"; - public async Task TruncatePostgresNetworkTypes() + public async Task TruncatePostgresNetworkTypesAsync() { if (this.Transaction == null) { @@ -1266,7 +1266,7 @@ public class GetPostgresNetworkTypesCntRow public PhysicalAddress CMacaddr { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresNetworkTypesCnt() + public async Task GetPostgresNetworkTypesCntAsync() { if (this.Transaction == null) { @@ -1289,7 +1289,7 @@ public class InsertPostgresNetworkTypesBatchArgs public IPAddress CInet { get; set; } public PhysicalAddress CMacaddr { get; set; } }; - public async Task InsertPostgresNetworkTypesBatch(List args) + public async Task InsertPostgresNetworkTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1344,7 +1344,7 @@ public class InsertPostgresSpecialTypesArgs public Guid? CUuid { get; set; } public CEnum? CEnum { get; set; } }; - public async Task InsertPostgresSpecialTypes(InsertPostgresSpecialTypesArgs args) + public async Task InsertPostgresSpecialTypesAsync(InsertPostgresSpecialTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_json", args.CJson.HasValue ? (object)args.CJson.Value : null); @@ -1378,7 +1378,7 @@ public class InsertPostgresNotNullTypesArgs { public CEnum CEnumNotNull { get; set; } }; - public async Task InsertPostgresNotNullTypes(InsertPostgresNotNullTypesArgs args) + public async Task InsertPostgresNotNullTypesAsync(InsertPostgresNotNullTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_enum_not_null", args.CEnumNotNull.Stringify()); @@ -1402,7 +1402,7 @@ public class GetPostgresNotNullTypesRow { public CEnum CEnumNotNull { get; set; } }; - public async Task GetPostgresNotNullTypes() + public async Task GetPostgresNotNullTypesAsync() { if (this.Transaction == null) { @@ -1419,7 +1419,7 @@ public async Task GetPostgresNotNullTypes() } private const string TruncatePostgresNotNullTypesSql = "TRUNCATE TABLE postgres_not_null_types"; - public async Task TruncatePostgresNotNullTypes() + public async Task TruncatePostgresNotNullTypesAsync() { if (this.Transaction == null) { @@ -1455,7 +1455,7 @@ public class GetPostgresSpecialTypesRow public Guid? CUuid { get; set; } public CEnum? CEnum { get; set; } }; - public async Task GetPostgresSpecialTypes() + public async Task GetPostgresSpecialTypesAsync() { if (this.Transaction == null) { @@ -1472,7 +1472,7 @@ public async Task GetPostgresSpecialTypes() } private const string TruncatePostgresSpecialTypesSql = "TRUNCATE TABLE postgres_special_types"; - public async Task TruncatePostgresSpecialTypes() + public async Task TruncatePostgresSpecialTypesAsync() { if (this.Transaction == null) { @@ -1493,7 +1493,7 @@ public class InsertPostgresSpecialTypesBatchArgs public JsonElement? CJson { get; set; } public JsonElement? CJsonb { get; set; } }; - public async Task InsertPostgresSpecialTypesBatch(List args) + public async Task InsertPostgresSpecialTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1542,7 +1542,7 @@ public class GetPostgresSpecialTypesCntRow public JsonElement? CJsonb { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresSpecialTypesCnt() + public async Task GetPostgresSpecialTypesCntAsync() { if (this.Transaction == null) { @@ -1580,7 +1580,7 @@ public class InsertPostgresArrayTypesArgs public DateTime[] CDateArray { get; set; } public DateTime[] CTimestampArray { get; set; } }; - public async Task InsertPostgresArrayTypes(InsertPostgresArrayTypesArgs args) + public async Task InsertPostgresArrayTypesAsync(InsertPostgresArrayTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_bytea", args.CBytea); @@ -1613,7 +1613,7 @@ public class GetPostgresArrayTypesRow public DateTime[] CDateArray { get; set; } public DateTime[] CTimestampArray { get; set; } }; - public async Task GetPostgresArrayTypes() + public async Task GetPostgresArrayTypesAsync() { if (this.Transaction == null) { @@ -1639,7 +1639,7 @@ public class InsertPostgresArrayTypesBatchArgs public decimal[] CDecimalArray { get; set; } public DateTime[] CTimestampArray { get; set; } }; - public async Task InsertPostgresArrayTypesBatch(List args) + public async Task InsertPostgresArrayTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1691,7 +1691,7 @@ public class GetPostgresArrayTypesCntRow public DateTime[] CTimestampArray { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresArrayTypesCnt() + public async Task GetPostgresArrayTypesCntAsync() { if (this.Transaction == null) { @@ -1708,7 +1708,7 @@ public async Task GetPostgresArrayTypesCnt() } private const string TruncatePostgresArrayTypesSql = "TRUNCATE TABLE postgres_array_types"; - public async Task TruncatePostgresArrayTypes() + public async Task TruncatePostgresArrayTypesAsync() { if (this.Transaction == null) { @@ -1743,7 +1743,7 @@ public class InsertPostgresGeoTypesArgs public NpgsqlPolygon? CPolygon { get; set; } public NpgsqlCircle? CCircle { get; set; } }; - public async Task InsertPostgresGeoTypes(InsertPostgresGeoTypesArgs args) + public async Task InsertPostgresGeoTypesAsync(InsertPostgresGeoTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_point", args.CPoint); @@ -1776,7 +1776,7 @@ public class InsertPostgresGeoTypesBatchArgs public NpgsqlPolygon? CPolygon { get; set; } public NpgsqlCircle? CCircle { get; set; } }; - public async Task InsertPostgresGeoTypesBatch(List args) + public async Task InsertPostgresGeoTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1813,7 +1813,7 @@ public class GetPostgresGeoTypesRow public NpgsqlPolygon? CPolygon { get; set; } public NpgsqlCircle? CCircle { get; set; } }; - public async Task GetPostgresGeoTypes() + public async Task GetPostgresGeoTypesAsync() { if (this.Transaction == null) { @@ -1830,7 +1830,7 @@ public async Task GetPostgresGeoTypes() } private const string TruncatePostgresGeoTypesSql = "TRUNCATE TABLE postgres_geometric_types"; - public async Task TruncatePostgresGeoTypes() + public async Task TruncatePostgresGeoTypesAsync() { if (this.Transaction == null) { diff --git a/examples/NpgsqlDapperLegacyExample/request.json b/examples/NpgsqlDapperLegacyExample/request.json index bd0009a1..5284a64d 100644 --- a/examples/NpgsqlDapperLegacyExample/request.json +++ b/examples/NpgsqlDapperLegacyExample/request.json @@ -36232,5 +36232,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiTnBnc3FsRGFwcGVyTGVnYWN5RXhhbXBsZUdlbiIsInVzZURhcHBlciI6dHJ1ZSwib3ZlcnJpZGVEYXBwZXJWZXJzaW9uIjoiIiwib3ZlcnJpZGVzIjpbeyJjb2x1bW4iOiJHZXRQb3N0Z3Jlc0Z1bmN0aW9uczptYXhfaW50ZWdlciIsImNzaGFycF90eXBlIjp7InR5cGUiOiJpbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0UG9zdGdyZXNGdW5jdGlvbnM6bWF4X3ZhcmNoYXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFBvc3RncmVzRnVuY3Rpb25zOm1heF90aW1lc3RhbXAiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiRGF0ZVRpbWUiLCJub3ROdWxsIjp0cnVlfX0seyJjb2x1bW4iOiJHZXRQb3N0Z3Jlc1NwZWNpYWxUeXBlc0NudDpjX2pzb24iLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSnNvbkVsZW1lbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0UG9zdGdyZXNTcGVjaWFsVHlwZXNDbnQ6Y19qc29uYiIsImNzaGFycF90eXBlIjp7InR5cGUiOiJKc29uRWxlbWVudCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfanNvbl9zdHJpbmdfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y194bWxfc3RyaW5nX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfbWFjYWRkcjgiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190aW1lc3RhbXBfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19XSwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZX0=" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiTnBnc3FsRGFwcGVyTGVnYWN5RXhhbXBsZUdlbiIsInVzZURhcHBlciI6dHJ1ZSwib3ZlcnJpZGVEYXBwZXJWZXJzaW9uIjoiIiwib3ZlcnJpZGVzIjpbeyJjb2x1bW4iOiJHZXRQb3N0Z3Jlc0Z1bmN0aW9uczptYXhfaW50ZWdlciIsImNzaGFycF90eXBlIjp7InR5cGUiOiJpbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0UG9zdGdyZXNGdW5jdGlvbnM6bWF4X3ZhcmNoYXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFBvc3RncmVzRnVuY3Rpb25zOm1heF90aW1lc3RhbXAiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiRGF0ZVRpbWUiLCJub3ROdWxsIjp0cnVlfX0seyJjb2x1bW4iOiJHZXRQb3N0Z3Jlc1NwZWNpYWxUeXBlc0NudDpjX2pzb24iLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSnNvbkVsZW1lbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0UG9zdGdyZXNTcGVjaWFsVHlwZXNDbnQ6Y19qc29uYiIsImNzaGFycF90eXBlIjp7InR5cGUiOiJKc29uRWxlbWVudCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfanNvbl9zdHJpbmdfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y194bWxfc3RyaW5nX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfbWFjYWRkcjgiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190aW1lc3RhbXBfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19XSwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZSwid2l0aEFzeW5jU3VmZml4Ijp0cnVlfQ==" } \ No newline at end of file diff --git a/examples/NpgsqlDapperLegacyExample/request.message b/examples/NpgsqlDapperLegacyExample/request.message index 7ebc5b9b..ffaf95f7 100644 --- a/examples/NpgsqlDapperLegacyExample/request.message +++ b/examples/NpgsqlDapperLegacyExample/request.message @@ -10917,4 +10917,4 @@ hSELECT c_point, c_line, c_lseg, c_box, c_path, c_polygon, c_circle FROM postgre c_path0ÿÿÿÿÿÿÿÿÿRpostgres_geometric_typesbpathzc_path"H c_polygon0ÿÿÿÿÿÿÿÿÿRpostgres_geometric_typesb polygonz c_polygon"E c_circle0ÿÿÿÿÿÿÿÿÿRpostgres_geometric_typesbcirclezc_circle: query.sqlU -'TRUNCATE TABLE postgres_geometric_typesTruncatePostgresGeoTypes:exec: query.sql"v1.30.0*±{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"netstandard2.0","namespaceName":"NpgsqlDapperLegacyExampleGen","useDapper":true,"overrideDapperVersion":"","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}}],"debugRequest":false,"useCentralPackageManagement":false} \ No newline at end of file +'TRUNCATE TABLE postgres_geometric_typesTruncatePostgresGeoTypes:exec: query.sql"v1.30.0*È{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"netstandard2.0","namespaceName":"NpgsqlDapperLegacyExampleGen","useDapper":true,"overrideDapperVersion":"","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}}],"debugRequest":false,"useCentralPackageManagement":false,"withAsyncSuffix":true} \ No newline at end of file diff --git a/examples/NpgsqlExample/QuerySql.cs b/examples/NpgsqlExample/QuerySql.cs index 4ffa27c6..4c8154bb 100644 --- a/examples/NpgsqlExample/QuerySql.cs +++ b/examples/NpgsqlExample/QuerySql.cs @@ -46,7 +46,7 @@ public static QuerySql WithTransaction(NpgsqlTransaction transaction) WHERE name = @name LIMIT 1"; public readonly record struct GetAuthorRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorArgs(string Name); - public async Task GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { if (this.Transaction == null) { @@ -104,7 +104,7 @@ LIMIT @limit OFFSET @offset"; public readonly record struct ListAuthorsRow(long Id, string Name, string? Bio); public readonly record struct ListAuthorsArgs(int Offset, int Limit); - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { if (this.Transaction == null) { @@ -146,7 +146,7 @@ public async Task> ListAuthors(ListAuthorsArgs args) private const string CreateAuthorSql = "INSERT INTO authors (id, name, bio) VALUES (@id, @name, @bio) RETURNING id, name, bio"; public readonly record struct CreateAuthorRow(long Id, string Name, string? Bio); public readonly record struct CreateAuthorArgs(long Id, string Name, string? Bio); - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { if (this.Transaction == null) { @@ -204,7 +204,7 @@ public async Task> ListAuthors(ListAuthorsArgs args) private const string CreateAuthorReturnIdSql = "INSERT INTO authors (name, bio) VALUES (@name, @bio) RETURNING id"; public readonly record struct CreateAuthorReturnIdRow(long Id); public readonly record struct CreateAuthorReturnIdArgs(string Name, string? Bio); - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { if (this.Transaction == null) { @@ -237,7 +237,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) WHERE id = @id LIMIT 1"; public readonly record struct GetAuthorByIdRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorByIdArgs(long Id); - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { if (this.Transaction == null) { @@ -292,7 +292,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) WHERE name LIKE COALESCE(@name_pattern, '%')"; public readonly record struct GetAuthorByNamePatternRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorByNamePatternArgs(string? NamePattern); - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { if (this.Transaction == null) { @@ -332,7 +332,7 @@ public async Task> GetAuthorByNamePattern(GetAut private const string DeleteAuthorSql = @"DELETE FROM authors WHERE name = @name"; public readonly record struct DeleteAuthorArgs(string Name); - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { if (this.Transaction == null) { @@ -360,7 +360,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) } private const string TruncateAuthorsSql = "TRUNCATE TABLE authors CASCADE"; - public async Task TruncateAuthors() + public async Task TruncateAuthorsAsync() { if (this.Transaction == null) { @@ -389,7 +389,7 @@ public async Task TruncateAuthors() SET bio = @bio WHERE bio IS NOT NULL"; public readonly record struct UpdateAuthorsArgs(string? Bio); - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { if (this.Transaction == null) { @@ -418,7 +418,7 @@ public async Task UpdateAuthors(UpdateAuthorsArgs args) WHERE id = ANY(@longArr_1::BIGINT [])"; public readonly record struct GetAuthorsByIdsRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsArgs(long[] LongArr1); - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { if (this.Transaction == null) { @@ -460,7 +460,7 @@ FROM authors WHERE id = ANY(@longArr_1::BIGINT []) AND name = ANY(@stringArr_2::TEXT [])"; public readonly record struct GetAuthorsByIdsAndNamesRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsAndNamesArgs(long[] LongArr1, string[] StringArr2); - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { if (this.Transaction == null) { @@ -502,7 +502,7 @@ public async Task> GetAuthorsByIdsAndNames(GetA private const string CreateBookSql = "INSERT INTO books (name, author_id) VALUES (@name, @author_id) RETURNING id"; public readonly record struct CreateBookRow(Guid Id); public readonly record struct CreateBookArgs(string Name, long AuthorId); - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { if (this.Transaction == null) { @@ -538,7 +538,7 @@ FROM authors INNER JOIN books ON authors.id = books.author_id ORDER BY authors.name"; public readonly record struct ListAllAuthorsBooksRow(Author? Author, Book? Book); - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -580,7 +580,7 @@ FROM authors AS authors1 INNER JOIN authors AS authors2 ON authors1.name = authors2.name WHERE authors1.id < authors2.id"; public readonly record struct GetDuplicateAuthorsRow(Author? Author, Author? Author2); - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -622,7 +622,7 @@ public async Task> GetDuplicateAuthors() WHERE books.name = @name"; public readonly record struct GetAuthorsByBookNameRow(long Id, string Name, string? Bio, Book? Book); public readonly record struct GetAuthorsByBookNameArgs(string Name); - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -661,7 +661,7 @@ public async Task> GetAuthorsByBookName(GetAuthors private const string CreateExtendedBioSql = "INSERT INTO extended.bios (author_name, name, bio_type) VALUES (@author_name, @name, @bio_type)"; public readonly record struct CreateExtendedBioArgs(string AuthorName, string Name, ExtendedBioType? BioType); - public async Task CreateExtendedBio(CreateExtendedBioArgs args) + public async Task CreateExtendedBioAsync(CreateExtendedBioArgs args) { if (this.Transaction == null) { @@ -695,7 +695,7 @@ public async Task CreateExtendedBio(CreateExtendedBioArgs args) private const string GetFirstExtendedBioByTypeSql = "SELECT author_name, name, bio_type FROM extended.bios WHERE bio_type = @bio_type LIMIT 1"; public readonly record struct GetFirstExtendedBioByTypeRow(string AuthorName, string Name, ExtendedBioType? BioType); public readonly record struct GetFirstExtendedBioByTypeArgs(ExtendedBioType? BioType); - public async Task GetFirstExtendedBioByType(GetFirstExtendedBioByTypeArgs args) + public async Task GetFirstExtendedBioByTypeAsync(GetFirstExtendedBioByTypeArgs args) { if (this.Transaction == null) { @@ -747,7 +747,7 @@ public async Task CreateExtendedBio(CreateExtendedBioArgs args) } private const string TruncateExtendedBiosSql = "TRUNCATE TABLE extended.bios"; - public async Task TruncateExtendedBios() + public async Task TruncateExtendedBiosAsync() { if (this.Transaction == null) { @@ -780,7 +780,7 @@ FROM postgres_datetime_types CROSS JOIN postgres_numeric_types CROSS JOIN postgres_string_types"; public readonly record struct GetPostgresFunctionsRow(int? MaxInteger, string? MaxVarchar, DateTime MaxTimestamp); - public async Task GetPostgresFunctions() + public async Task GetPostgresFunctionsAsync() { if (this.Transaction == null) { @@ -845,7 +845,7 @@ INSERT INTO postgres_numeric_types ) VALUES (@c_boolean, @c_bit, @c_smallint, @c_integer, @c_bigint, @c_decimal, @c_numeric, @c_real, @c_double_precision, @c_money)"; public readonly record struct InsertPostgresNumericTypesArgs(bool? CBoolean, byte[]? CBit, short? CSmallint, int? CInteger, long? CBigint, decimal? CDecimal, decimal? CNumeric, float? CReal, double? CDoublePrecision, decimal? CMoney); - public async Task InsertPostgresNumericTypes(InsertPostgresNumericTypesArgs args) + public async Task InsertPostgresNumericTypesAsync(InsertPostgresNumericTypesArgs args) { if (this.Transaction == null) { @@ -892,7 +892,7 @@ public async Task InsertPostgresNumericTypes(InsertPostgresNumericTypesArgs args private const string GetPostgresNumericTypesSql = "SELECT c_boolean, c_bit, c_smallint, c_integer, c_bigint, c_decimal, c_numeric, c_real, c_double_precision, c_money FROM postgres_numeric_types LIMIT 1"; public readonly record struct GetPostgresNumericTypesRow(bool? CBoolean, byte[]? CBit, short? CSmallint, int? CInteger, long? CBigint, decimal? CDecimal, decimal? CNumeric, float? CReal, double? CDoublePrecision, decimal? CMoney); - public async Task GetPostgresNumericTypes() + public async Task GetPostgresNumericTypesAsync() { if (this.Transaction == null) { @@ -956,7 +956,7 @@ public async Task InsertPostgresNumericTypes(InsertPostgresNumericTypesArgs args } private const string TruncatePostgresNumericTypesSql = "TRUNCATE TABLE postgres_numeric_types"; - public async Task TruncatePostgresNumericTypes() + public async Task TruncatePostgresNumericTypesAsync() { if (this.Transaction == null) { @@ -1007,7 +1007,7 @@ GROUP BY c_money LIMIT 1"; public readonly record struct GetPostgresNumericTypesCntRow(bool? CBoolean, byte[]? CBit, short? CSmallint, int? CInteger, long? CBigint, decimal? CDecimal, decimal? CNumeric, float? CReal, double? CDoublePrecision, decimal? CMoney, long Cnt); - public async Task GetPostgresNumericTypesCnt() + public async Task GetPostgresNumericTypesCntAsync() { if (this.Transaction == null) { @@ -1074,7 +1074,7 @@ GROUP BY private const string InsertPostgresNumericTypesBatchSql = "COPY postgres_numeric_types (c_boolean, c_bit, c_smallint, c_integer, c_bigint, c_decimal, c_numeric, c_real, c_double_precision, c_money) FROM STDIN (FORMAT BINARY)"; public readonly record struct InsertPostgresNumericTypesBatchArgs(bool? CBoolean, byte[]? CBit, short? CSmallint, int? CInteger, long? CBigint, decimal? CDecimal, decimal? CNumeric, float? CReal, double? CDoublePrecision, decimal? CMoney); - public async Task InsertPostgresNumericTypesBatch(List args) + public async Task InsertPostgresNumericTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1114,7 +1114,7 @@ INSERT INTO postgres_string_types ) VALUES (@c_char, @c_varchar, @c_character_varying, @c_bpchar, @c_text)"; public readonly record struct InsertPostgresStringTypesArgs(string? CChar, string? CVarchar, string? CCharacterVarying, string? CBpchar, string? CText); - public async Task InsertPostgresStringTypes(InsertPostgresStringTypesArgs args) + public async Task InsertPostgresStringTypesAsync(InsertPostgresStringTypesArgs args) { if (this.Transaction == null) { @@ -1151,7 +1151,7 @@ public async Task InsertPostgresStringTypes(InsertPostgresStringTypesArgs args) private const string InsertPostgresStringTypesBatchSql = "COPY postgres_string_types (c_char, c_varchar, c_character_varying, c_bpchar, c_text) FROM STDIN (FORMAT BINARY)"; public readonly record struct InsertPostgresStringTypesBatchArgs(string? CChar, string? CVarchar, string? CCharacterVarying, string? CBpchar, string? CText); - public async Task InsertPostgresStringTypesBatch(List args) + public async Task InsertPostgresStringTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1177,7 +1177,7 @@ public async Task InsertPostgresStringTypesBatch(List GetPostgresStringTypes() + public async Task GetPostgresStringTypesAsync() { if (this.Transaction == null) { @@ -1231,7 +1231,7 @@ public async Task InsertPostgresStringTypesBatch(List GetPostgresStringTypesCnt() + public async Task GetPostgresStringTypesCntAsync() { if (this.Transaction == null) { @@ -1342,7 +1342,7 @@ ORDER BY rnk DESC LIMIT 1"; public readonly record struct GetPostgresStringTypesTextSearchRow(string? CText, NpgsqlTsQuery Query, NpgsqlTsVector Tsv, float Rnk); public readonly record struct GetPostgresStringTypesTextSearchArgs(string ToTsquery); - public async Task GetPostgresStringTypesTextSearch(GetPostgresStringTypesTextSearchArgs args) + public async Task GetPostgresStringTypesTextSearchAsync(GetPostgresStringTypesTextSearchArgs args) { if (this.Transaction == null) { @@ -1406,7 +1406,7 @@ INSERT INTO postgres_datetime_types c_timestamp_noda_instant_override ) VALUES (@c_date, @c_time, @c_timestamp, @c_timestamp_with_tz, @c_interval, @c_timestamp_noda_instant_override)"; public readonly record struct InsertPostgresDateTimeTypesArgs(DateTime? CDate, TimeSpan? CTime, DateTime? CTimestamp, DateTime? CTimestampWithTz, TimeSpan? CInterval, Instant? CTimestampNodaInstantOverride); - public async Task InsertPostgresDateTimeTypes(InsertPostgresDateTimeTypesArgs args) + public async Task InsertPostgresDateTimeTypesAsync(InsertPostgresDateTimeTypesArgs args) { if (this.Transaction == null) { @@ -1445,7 +1445,7 @@ public async Task InsertPostgresDateTimeTypes(InsertPostgresDateTimeTypesArgs ar private const string GetPostgresDateTimeTypesSql = "SELECT c_date, c_time, c_timestamp, c_timestamp_with_tz, c_interval, c_timestamp_noda_instant_override FROM postgres_datetime_types LIMIT 1"; public readonly record struct GetPostgresDateTimeTypesRow(DateTime? CDate, TimeSpan? CTime, DateTime? CTimestamp, DateTime? CTimestampWithTz, TimeSpan? CInterval, Instant? CTimestampNodaInstantOverride); - public async Task GetPostgresDateTimeTypes() + public async Task GetPostgresDateTimeTypesAsync() { if (this.Transaction == null) { @@ -1513,7 +1513,7 @@ public async Task InsertPostgresDateTimeTypes(InsertPostgresDateTimeTypesArgs ar } private const string TruncatePostgresDateTimeTypesSql = "TRUNCATE TABLE postgres_datetime_types"; - public async Task TruncatePostgresDateTimeTypes() + public async Task TruncatePostgresDateTimeTypesAsync() { if (this.Transaction == null) { @@ -1554,7 +1554,7 @@ GROUP BY c_interval LIMIT 1"; public readonly record struct GetPostgresDateTimeTypesCntRow(DateTime? CDate, TimeSpan? CTime, DateTime? CTimestamp, DateTime? CTimestampWithTz, TimeSpan? CInterval, long Cnt); - public async Task GetPostgresDateTimeTypesCnt() + public async Task GetPostgresDateTimeTypesCntAsync() { if (this.Transaction == null) { @@ -1611,7 +1611,7 @@ GROUP BY private const string InsertPostgresDateTimeTypesBatchSql = "COPY postgres_datetime_types (c_date, c_time, c_timestamp, c_timestamp_with_tz, c_interval) FROM STDIN (FORMAT BINARY)"; public readonly record struct InsertPostgresDateTimeTypesBatchArgs(DateTime? CDate, TimeSpan? CTime, DateTime? CTimestamp, DateTime? CTimestampWithTz, TimeSpan? CInterval); - public async Task InsertPostgresDateTimeTypesBatch(List args) + public async Task InsertPostgresDateTimeTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1649,7 +1649,7 @@ INSERT INTO postgres_network_types @c_macaddr8::macaddr8 )"; public readonly record struct InsertPostgresNetworkTypesArgs(NpgsqlCidr? CCidr, IPAddress? CInet, PhysicalAddress? CMacaddr, string? CMacaddr8); - public async Task InsertPostgresNetworkTypes(InsertPostgresNetworkTypesArgs args) + public async Task InsertPostgresNetworkTypesAsync(InsertPostgresNetworkTypesArgs args) { if (this.Transaction == null) { @@ -1690,7 +1690,7 @@ public async Task InsertPostgresNetworkTypes(InsertPostgresNetworkTypesArgs args FROM postgres_network_types LIMIT 1"; public readonly record struct GetPostgresNetworkTypesRow(NpgsqlCidr? CCidr, IPAddress? CInet, PhysicalAddress? CMacaddr, string? CMacaddr8); - public async Task GetPostgresNetworkTypes() + public async Task GetPostgresNetworkTypesAsync() { if (this.Transaction == null) { @@ -1742,7 +1742,7 @@ FROM postgres_network_types } private const string TruncatePostgresNetworkTypesSql = "TRUNCATE TABLE postgres_network_types"; - public async Task TruncatePostgresNetworkTypes() + public async Task TruncatePostgresNetworkTypesAsync() { if (this.Transaction == null) { @@ -1779,7 +1779,7 @@ GROUP BY c_macaddr LIMIT 1"; public readonly record struct GetPostgresNetworkTypesCntRow(NpgsqlCidr? CCidr, IPAddress? CInet, PhysicalAddress? CMacaddr, long Cnt); - public async Task GetPostgresNetworkTypesCnt() + public async Task GetPostgresNetworkTypesCntAsync() { if (this.Transaction == null) { @@ -1832,7 +1832,7 @@ GROUP BY private const string InsertPostgresNetworkTypesBatchSql = "COPY postgres_network_types (c_cidr, c_inet, c_macaddr) FROM STDIN (FORMAT BINARY)"; public readonly record struct InsertPostgresNetworkTypesBatchArgs(NpgsqlCidr? CCidr, IPAddress? CInet, PhysicalAddress? CMacaddr); - public async Task InsertPostgresNetworkTypesBatch(List args) + public async Task InsertPostgresNetworkTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1877,7 +1877,7 @@ INSERT INTO postgres_special_types @c_enum::c_enum )"; public readonly record struct InsertPostgresSpecialTypesArgs(JsonElement? CJson, string? CJsonStringOverride, JsonElement? CJsonb, string? CJsonpath, XmlDocument? CXml, string? CXmlStringOverride, Guid? CUuid, CEnum? CEnum); - public async Task InsertPostgresSpecialTypes(InsertPostgresSpecialTypesArgs args) + public async Task InsertPostgresSpecialTypesAsync(InsertPostgresSpecialTypesArgs args) { if (this.Transaction == null) { @@ -1926,7 +1926,7 @@ public async Task InsertPostgresSpecialTypes(InsertPostgresSpecialTypesArgs args @c_enum_not_null::c_enum )"; public readonly record struct InsertPostgresNotNullTypesArgs(CEnum CEnumNotNull); - public async Task InsertPostgresNotNullTypes(InsertPostgresNotNullTypesArgs args) + public async Task InsertPostgresNotNullTypesAsync(InsertPostgresNotNullTypesArgs args) { if (this.Transaction == null) { @@ -1958,7 +1958,7 @@ public async Task InsertPostgresNotNullTypes(InsertPostgresNotNullTypesArgs args FROM postgres_not_null_types LIMIT 1"; public readonly record struct GetPostgresNotNullTypesRow(CEnum CEnumNotNull); - public async Task GetPostgresNotNullTypes() + public async Task GetPostgresNotNullTypesAsync() { if (this.Transaction == null) { @@ -2004,7 +2004,7 @@ FROM postgres_not_null_types } private const string TruncatePostgresNotNullTypesSql = "TRUNCATE TABLE postgres_not_null_types"; - public async Task TruncatePostgresNotNullTypes() + public async Task TruncatePostgresNotNullTypesAsync() { if (this.Transaction == null) { @@ -2041,7 +2041,7 @@ public async Task TruncatePostgresNotNullTypes() FROM postgres_special_types LIMIT 1"; public readonly record struct GetPostgresSpecialTypesRow(JsonElement? CJson, string? CJsonStringOverride, JsonElement? CJsonb, string? CJsonpath, XmlDocument? CXml, string? CXmlStringOverride, Guid? CUuid, CEnum? CEnum); - public async Task GetPostgresSpecialTypes() + public async Task GetPostgresSpecialTypesAsync() { if (this.Transaction == null) { @@ -2111,7 +2111,7 @@ FROM postgres_special_types } private const string TruncatePostgresSpecialTypesSql = "TRUNCATE TABLE postgres_special_types"; - public async Task TruncatePostgresSpecialTypes() + public async Task TruncatePostgresSpecialTypesAsync() { if (this.Transaction == null) { @@ -2138,7 +2138,7 @@ public async Task TruncatePostgresSpecialTypes() private const string InsertPostgresSpecialTypesBatchSql = "COPY postgres_special_types (c_uuid, c_json, c_jsonb) FROM STDIN (FORMAT BINARY)"; public readonly record struct InsertPostgresSpecialTypesBatchArgs(Guid? CUuid, JsonElement? CJson, JsonElement? CJsonb); - public async Task InsertPostgresSpecialTypesBatch(List args) + public async Task InsertPostgresSpecialTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -2181,7 +2181,7 @@ GROUP BY FROM grouped_json_types LIMIT 1"; public readonly record struct GetPostgresSpecialTypesCntRow(Guid? CUuid, JsonElement? CJson, JsonElement? CJsonb, long Cnt); - public async Task GetPostgresSpecialTypesCnt() + public async Task GetPostgresSpecialTypesCntAsync() { if (this.Transaction == null) { @@ -2245,7 +2245,7 @@ INSERT INTO postgres_array_types ) VALUES (@c_bytea, @c_boolean_array, @c_text_array, @c_integer_array, @c_decimal_array, @c_date_array, @c_timestamp_array)"; public readonly record struct InsertPostgresArrayTypesArgs(byte[]? CBytea, bool[]? CBooleanArray, string[]? CTextArray, int[]? CIntegerArray, decimal[]? CDecimalArray, DateTime[]? CDateArray, DateTime[]? CTimestampArray); - public async Task InsertPostgresArrayTypes(InsertPostgresArrayTypesArgs args) + public async Task InsertPostgresArrayTypesAsync(InsertPostgresArrayTypesArgs args) { if (this.Transaction == null) { @@ -2286,7 +2286,7 @@ public async Task InsertPostgresArrayTypes(InsertPostgresArrayTypesArgs args) private const string GetPostgresArrayTypesSql = "SELECT c_bytea, c_boolean_array, c_text_array, c_integer_array, c_decimal_array, c_date_array, c_timestamp_array FROM postgres_array_types LIMIT 1"; public readonly record struct GetPostgresArrayTypesRow(byte[]? CBytea, bool[]? CBooleanArray, string[]? CTextArray, int[]? CIntegerArray, decimal[]? CDecimalArray, DateTime[]? CDateArray, DateTime[]? CTimestampArray); - public async Task GetPostgresArrayTypes() + public async Task GetPostgresArrayTypesAsync() { if (this.Transaction == null) { @@ -2345,7 +2345,7 @@ public async Task InsertPostgresArrayTypes(InsertPostgresArrayTypesArgs args) private const string InsertPostgresArrayTypesBatchSql = "COPY postgres_array_types (c_bytea, c_boolean_array, c_text_array, c_integer_array, c_decimal_array, c_timestamp_array) FROM STDIN (FORMAT BINARY)"; public readonly record struct InsertPostgresArrayTypesBatchArgs(byte[]? CBytea, bool[]? CBooleanArray, string[]? CTextArray, int[]? CIntegerArray, decimal[]? CDecimalArray, DateTime[]? CTimestampArray); - public async Task InsertPostgresArrayTypesBatch(List args) + public async Task InsertPostgresArrayTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -2388,7 +2388,7 @@ GROUP BY c_timestamp_array LIMIT 1"; public readonly record struct GetPostgresArrayTypesCntRow(byte[]? CBytea, bool[]? CBooleanArray, string[]? CTextArray, int[]? CIntegerArray, decimal[]? CDecimalArray, DateTime[]? CTimestampArray, long Cnt); - public async Task GetPostgresArrayTypesCnt() + public async Task GetPostgresArrayTypesCntAsync() { if (this.Transaction == null) { @@ -2446,7 +2446,7 @@ GROUP BY } private const string TruncatePostgresArrayTypesSql = "TRUNCATE TABLE postgres_array_types"; - public async Task TruncatePostgresArrayTypes() + public async Task TruncatePostgresArrayTypesAsync() { if (this.Transaction == null) { @@ -2483,7 +2483,7 @@ INSERT INTO postgres_geometric_types ( ) VALUES (@c_point, @c_line, @c_lseg, @c_box, @c_path, @c_polygon, @c_circle)"; public readonly record struct InsertPostgresGeoTypesArgs(NpgsqlPoint? CPoint, NpgsqlLine? CLine, NpgsqlLSeg? CLseg, NpgsqlBox? CBox, NpgsqlPath? CPath, NpgsqlPolygon? CPolygon, NpgsqlCircle? CCircle); - public async Task InsertPostgresGeoTypes(InsertPostgresGeoTypesArgs args) + public async Task InsertPostgresGeoTypesAsync(InsertPostgresGeoTypesArgs args) { if (this.Transaction == null) { @@ -2524,7 +2524,7 @@ public async Task InsertPostgresGeoTypes(InsertPostgresGeoTypesArgs args) private const string InsertPostgresGeoTypesBatchSql = "COPY postgres_geometric_types (c_point, c_line, c_lseg, c_box, c_path, c_polygon, c_circle) FROM STDIN (FORMAT BINARY)"; public readonly record struct InsertPostgresGeoTypesBatchArgs(NpgsqlPoint? CPoint, NpgsqlLine? CLine, NpgsqlLSeg? CLseg, NpgsqlBox? CBox, NpgsqlPath? CPath, NpgsqlPolygon? CPolygon, NpgsqlCircle? CCircle); - public async Task InsertPostgresGeoTypesBatch(List args) + public async Task InsertPostgresGeoTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -2552,7 +2552,7 @@ public async Task InsertPostgresGeoTypesBatch(List GetPostgresGeoTypes() + public async Task GetPostgresGeoTypesAsync() { if (this.Transaction == null) { @@ -2610,7 +2610,7 @@ public async Task InsertPostgresGeoTypesBatch(List GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { if (this.Transaction == null) { @@ -122,7 +122,7 @@ public class ListAuthorsArgs public int Offset { get; set; } public int Limit { get; set; } }; - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { if (this.Transaction == null) { @@ -174,7 +174,7 @@ public class CreateAuthorArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { if (this.Transaction == null) { @@ -239,7 +239,7 @@ public class CreateAuthorReturnIdArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { if (this.Transaction == null) { @@ -280,7 +280,7 @@ public class GetAuthorByIdArgs { public long Id { get; set; } }; - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { if (this.Transaction == null) { @@ -343,7 +343,7 @@ public class GetAuthorByNamePatternArgs { public string NamePattern { get; set; } }; - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { if (this.Transaction == null) { @@ -386,7 +386,7 @@ public class DeleteAuthorArgs { public string Name { get; set; } }; - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { if (this.Transaction == null) { @@ -414,7 +414,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) } private const string TruncateAuthorsSql = "TRUNCATE TABLE authors CASCADE"; - public async Task TruncateAuthors() + public async Task TruncateAuthorsAsync() { if (this.Transaction == null) { @@ -446,7 +446,7 @@ public class UpdateAuthorsArgs { public string Bio { get; set; } }; - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { if (this.Transaction == null) { @@ -483,7 +483,7 @@ public class GetAuthorsByIdsArgs { public long[] LongArr1 { get; set; } }; - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { if (this.Transaction == null) { @@ -534,7 +534,7 @@ public class GetAuthorsByIdsAndNamesArgs public long[] LongArr1 { get; set; } public string[] StringArr2 { get; set; } }; - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { if (this.Transaction == null) { @@ -583,7 +583,7 @@ public class CreateBookArgs public string Name { get; set; } public long AuthorId { get; set; } }; - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { if (this.Transaction == null) { @@ -623,7 +623,7 @@ public class ListAllAuthorsBooksRow public Author Author { get; set; } public Book Book { get; set; } }; - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -669,7 +669,7 @@ public class GetDuplicateAuthorsRow public Author Author { get; set; } public Author Author2 { get; set; } }; - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -720,7 +720,7 @@ public class GetAuthorsByBookNameArgs { public string Name { get; set; } }; - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -764,7 +764,7 @@ public class CreateExtendedBioArgs public string Name { get; set; } public ExtendedBioType? BioType { get; set; } }; - public async Task CreateExtendedBio(CreateExtendedBioArgs args) + public async Task CreateExtendedBioAsync(CreateExtendedBioArgs args) { if (this.Transaction == null) { @@ -806,7 +806,7 @@ public class GetFirstExtendedBioByTypeArgs { public ExtendedBioType? BioType { get; set; } }; - public async Task GetFirstExtendedBioByType(GetFirstExtendedBioByTypeArgs args) + public async Task GetFirstExtendedBioByTypeAsync(GetFirstExtendedBioByTypeArgs args) { if (this.Transaction == null) { @@ -858,7 +858,7 @@ public async Task GetFirstExtendedBioByType(GetFir } private const string TruncateExtendedBiosSql = "TRUNCATE TABLE extended.bios"; - public async Task TruncateExtendedBios() + public async Task TruncateExtendedBiosAsync() { if (this.Transaction == null) { @@ -896,7 +896,7 @@ public class GetPostgresFunctionsRow public string MaxVarchar { get; set; } public DateTime MaxTimestamp { get; set; } }; - public async Task GetPostgresFunctions() + public async Task GetPostgresFunctionsAsync() { if (this.Transaction == null) { @@ -973,7 +973,7 @@ public class InsertPostgresNumericTypesArgs public double? CDoublePrecision { get; set; } public decimal? CMoney { get; set; } }; - public async Task InsertPostgresNumericTypes(InsertPostgresNumericTypesArgs args) + public async Task InsertPostgresNumericTypesAsync(InsertPostgresNumericTypesArgs args) { if (this.Transaction == null) { @@ -1032,7 +1032,7 @@ public class GetPostgresNumericTypesRow public double? CDoublePrecision { get; set; } public decimal? CMoney { get; set; } }; - public async Task GetPostgresNumericTypes() + public async Task GetPostgresNumericTypesAsync() { if (this.Transaction == null) { @@ -1096,7 +1096,7 @@ public async Task GetPostgresNumericTypes() } private const string TruncatePostgresNumericTypesSql = "TRUNCATE TABLE postgres_numeric_types"; - public async Task TruncatePostgresNumericTypes() + public async Task TruncatePostgresNumericTypesAsync() { if (this.Transaction == null) { @@ -1160,7 +1160,7 @@ public class GetPostgresNumericTypesCntRow public decimal? CMoney { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresNumericTypesCnt() + public async Task GetPostgresNumericTypesCntAsync() { if (this.Transaction == null) { @@ -1239,7 +1239,7 @@ public class InsertPostgresNumericTypesBatchArgs public double? CDoublePrecision { get; set; } public decimal? CMoney { get; set; } }; - public async Task InsertPostgresNumericTypesBatch(List args) + public async Task InsertPostgresNumericTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1286,7 +1286,7 @@ public class InsertPostgresStringTypesArgs public string CBpchar { get; set; } public string CText { get; set; } }; - public async Task InsertPostgresStringTypes(InsertPostgresStringTypesArgs args) + public async Task InsertPostgresStringTypesAsync(InsertPostgresStringTypesArgs args) { if (this.Transaction == null) { @@ -1330,7 +1330,7 @@ public class InsertPostgresStringTypesBatchArgs public string CBpchar { get; set; } public string CText { get; set; } }; - public async Task InsertPostgresStringTypesBatch(List args) + public async Task InsertPostgresStringTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1363,7 +1363,7 @@ public class GetPostgresStringTypesRow public string CBpchar { get; set; } public string CText { get; set; } }; - public async Task GetPostgresStringTypes() + public async Task GetPostgresStringTypesAsync() { if (this.Transaction == null) { @@ -1417,7 +1417,7 @@ public async Task GetPostgresStringTypes() } private const string TruncatePostgresStringTypesSql = "TRUNCATE TABLE postgres_string_types"; - public async Task TruncatePostgresStringTypes() + public async Task TruncatePostgresStringTypesAsync() { if (this.Transaction == null) { @@ -1466,7 +1466,7 @@ public class GetPostgresStringTypesCntRow public string CText { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresStringTypesCnt() + public async Task GetPostgresStringTypesCntAsync() { if (this.Transaction == null) { @@ -1545,7 +1545,7 @@ public class GetPostgresStringTypesTextSearchArgs { public string ToTsquery { get; set; } }; - public async Task GetPostgresStringTypesTextSearch(GetPostgresStringTypesTextSearchArgs args) + public async Task GetPostgresStringTypesTextSearchAsync(GetPostgresStringTypesTextSearchArgs args) { if (this.Transaction == null) { @@ -1617,7 +1617,7 @@ public class InsertPostgresDateTimeTypesArgs public TimeSpan? CInterval { get; set; } public Instant? CTimestampNodaInstantOverride { get; set; } }; - public async Task InsertPostgresDateTimeTypes(InsertPostgresDateTimeTypesArgs args) + public async Task InsertPostgresDateTimeTypesAsync(InsertPostgresDateTimeTypesArgs args) { if (this.Transaction == null) { @@ -1664,7 +1664,7 @@ public class GetPostgresDateTimeTypesRow public TimeSpan? CInterval { get; set; } public Instant? CTimestampNodaInstantOverride { get; set; } }; - public async Task GetPostgresDateTimeTypes() + public async Task GetPostgresDateTimeTypesAsync() { if (this.Transaction == null) { @@ -1732,7 +1732,7 @@ public async Task GetPostgresDateTimeTypes() } private const string TruncatePostgresDateTimeTypesSql = "TRUNCATE TABLE postgres_datetime_types"; - public async Task TruncatePostgresDateTimeTypes() + public async Task TruncatePostgresDateTimeTypesAsync() { if (this.Transaction == null) { @@ -1781,7 +1781,7 @@ public class GetPostgresDateTimeTypesCntRow public TimeSpan? CInterval { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresDateTimeTypesCnt() + public async Task GetPostgresDateTimeTypesCntAsync() { if (this.Transaction == null) { @@ -1845,7 +1845,7 @@ public class InsertPostgresDateTimeTypesBatchArgs public DateTime? CTimestampWithTz { get; set; } public TimeSpan? CInterval { get; set; } }; - public async Task InsertPostgresDateTimeTypesBatch(List args) + public async Task InsertPostgresDateTimeTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -1889,7 +1889,7 @@ public class InsertPostgresNetworkTypesArgs public PhysicalAddress CMacaddr { get; set; } public string CMacaddr8 { get; set; } }; - public async Task InsertPostgresNetworkTypes(InsertPostgresNetworkTypesArgs args) + public async Task InsertPostgresNetworkTypesAsync(InsertPostgresNetworkTypesArgs args) { if (this.Transaction == null) { @@ -1936,7 +1936,7 @@ public class GetPostgresNetworkTypesRow public PhysicalAddress CMacaddr { get; set; } public string CMacaddr8 { get; set; } }; - public async Task GetPostgresNetworkTypes() + public async Task GetPostgresNetworkTypesAsync() { if (this.Transaction == null) { @@ -1988,7 +1988,7 @@ public async Task GetPostgresNetworkTypes() } private const string TruncatePostgresNetworkTypesSql = "TRUNCATE TABLE postgres_network_types"; - public async Task TruncatePostgresNetworkTypes() + public async Task TruncatePostgresNetworkTypesAsync() { if (this.Transaction == null) { @@ -2031,7 +2031,7 @@ public class GetPostgresNetworkTypesCntRow public PhysicalAddress CMacaddr { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresNetworkTypesCnt() + public async Task GetPostgresNetworkTypesCntAsync() { if (this.Transaction == null) { @@ -2089,7 +2089,7 @@ public class InsertPostgresNetworkTypesBatchArgs public IPAddress CInet { get; set; } public PhysicalAddress CMacaddr { get; set; } }; - public async Task InsertPostgresNetworkTypesBatch(List args) + public async Task InsertPostgresNetworkTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -2144,7 +2144,7 @@ public class InsertPostgresSpecialTypesArgs public Guid? CUuid { get; set; } public CEnum? CEnum { get; set; } }; - public async Task InsertPostgresSpecialTypes(InsertPostgresSpecialTypesArgs args) + public async Task InsertPostgresSpecialTypesAsync(InsertPostgresSpecialTypesArgs args) { if (this.Transaction == null) { @@ -2196,7 +2196,7 @@ public class InsertPostgresNotNullTypesArgs { public CEnum CEnumNotNull { get; set; } }; - public async Task InsertPostgresNotNullTypes(InsertPostgresNotNullTypesArgs args) + public async Task InsertPostgresNotNullTypesAsync(InsertPostgresNotNullTypesArgs args) { if (this.Transaction == null) { @@ -2231,7 +2231,7 @@ public class GetPostgresNotNullTypesRow { public CEnum CEnumNotNull { get; set; } }; - public async Task GetPostgresNotNullTypes() + public async Task GetPostgresNotNullTypesAsync() { if (this.Transaction == null) { @@ -2277,7 +2277,7 @@ public async Task GetPostgresNotNullTypes() } private const string TruncatePostgresNotNullTypesSql = "TRUNCATE TABLE postgres_not_null_types"; - public async Task TruncatePostgresNotNullTypes() + public async Task TruncatePostgresNotNullTypesAsync() { if (this.Transaction == null) { @@ -2324,7 +2324,7 @@ public class GetPostgresSpecialTypesRow public Guid? CUuid { get; set; } public CEnum? CEnum { get; set; } }; - public async Task GetPostgresSpecialTypes() + public async Task GetPostgresSpecialTypesAsync() { if (this.Transaction == null) { @@ -2394,7 +2394,7 @@ public async Task GetPostgresSpecialTypes() } private const string TruncatePostgresSpecialTypesSql = "TRUNCATE TABLE postgres_special_types"; - public async Task TruncatePostgresSpecialTypes() + public async Task TruncatePostgresSpecialTypesAsync() { if (this.Transaction == null) { @@ -2426,7 +2426,7 @@ public class InsertPostgresSpecialTypesBatchArgs public JsonElement? CJson { get; set; } public JsonElement? CJsonb { get; set; } }; - public async Task InsertPostgresSpecialTypesBatch(List args) + public async Task InsertPostgresSpecialTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -2475,7 +2475,7 @@ public class GetPostgresSpecialTypesCntRow public JsonElement? CJsonb { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresSpecialTypesCnt() + public async Task GetPostgresSpecialTypesCntAsync() { if (this.Transaction == null) { @@ -2548,7 +2548,7 @@ public class InsertPostgresArrayTypesArgs public DateTime[] CDateArray { get; set; } public DateTime[] CTimestampArray { get; set; } }; - public async Task InsertPostgresArrayTypes(InsertPostgresArrayTypesArgs args) + public async Task InsertPostgresArrayTypesAsync(InsertPostgresArrayTypesArgs args) { if (this.Transaction == null) { @@ -2598,7 +2598,7 @@ public class GetPostgresArrayTypesRow public DateTime[] CDateArray { get; set; } public DateTime[] CTimestampArray { get; set; } }; - public async Task GetPostgresArrayTypes() + public async Task GetPostgresArrayTypesAsync() { if (this.Transaction == null) { @@ -2665,7 +2665,7 @@ public class InsertPostgresArrayTypesBatchArgs public decimal[] CDecimalArray { get; set; } public DateTime[] CTimestampArray { get; set; } }; - public async Task InsertPostgresArrayTypesBatch(List args) + public async Task InsertPostgresArrayTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -2717,7 +2717,7 @@ public class GetPostgresArrayTypesCntRow public DateTime[] CTimestampArray { get; set; } public long Cnt { get; set; } }; - public async Task GetPostgresArrayTypesCnt() + public async Task GetPostgresArrayTypesCntAsync() { if (this.Transaction == null) { @@ -2775,7 +2775,7 @@ public async Task GetPostgresArrayTypesCnt() } private const string TruncatePostgresArrayTypesSql = "TRUNCATE TABLE postgres_array_types"; - public async Task TruncatePostgresArrayTypes() + public async Task TruncatePostgresArrayTypesAsync() { if (this.Transaction == null) { @@ -2821,7 +2821,7 @@ public class InsertPostgresGeoTypesArgs public NpgsqlPolygon? CPolygon { get; set; } public NpgsqlCircle? CCircle { get; set; } }; - public async Task InsertPostgresGeoTypes(InsertPostgresGeoTypesArgs args) + public async Task InsertPostgresGeoTypesAsync(InsertPostgresGeoTypesArgs args) { if (this.Transaction == null) { @@ -2871,7 +2871,7 @@ public class InsertPostgresGeoTypesBatchArgs public NpgsqlPolygon? CPolygon { get; set; } public NpgsqlCircle? CCircle { get; set; } }; - public async Task InsertPostgresGeoTypesBatch(List args) + public async Task InsertPostgresGeoTypesBatchAsync(List args) { using (var connection = new NpgsqlConnection(ConnectionString)) { @@ -2908,7 +2908,7 @@ public class GetPostgresGeoTypesRow public NpgsqlPolygon? CPolygon { get; set; } public NpgsqlCircle? CCircle { get; set; } }; - public async Task GetPostgresGeoTypes() + public async Task GetPostgresGeoTypesAsync() { if (this.Transaction == null) { @@ -2966,7 +2966,7 @@ public async Task GetPostgresGeoTypes() } private const string TruncatePostgresGeoTypesSql = "TRUNCATE TABLE postgres_geometric_types"; - public async Task TruncatePostgresGeoTypes() + public async Task TruncatePostgresGeoTypesAsync() { if (this.Transaction == null) { diff --git a/examples/NpgsqlLegacyExample/request.json b/examples/NpgsqlLegacyExample/request.json index 1f9b08c6..bc5a8311 100644 --- a/examples/NpgsqlLegacyExample/request.json +++ b/examples/NpgsqlLegacyExample/request.json @@ -36232,5 +36232,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiTnBnc3FsTGVnYWN5RXhhbXBsZUdlbiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6W3siY29sdW1uIjoiR2V0UG9zdGdyZXNGdW5jdGlvbnM6bWF4X2ludGVnZXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiaW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFBvc3RncmVzRnVuY3Rpb25zOm1heF92YXJjaGFyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRQb3N0Z3Jlc0Z1bmN0aW9uczptYXhfdGltZXN0YW1wIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6dHJ1ZX19LHsiY29sdW1uIjoiR2V0UG9zdGdyZXNTcGVjaWFsVHlwZXNDbnQ6Y19qc29uIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikpzb25FbGVtZW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFBvc3RncmVzU3BlY2lhbFR5cGVzQ250OmNfanNvbmIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSnNvbkVsZW1lbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2pzb25fc3RyaW5nX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfeG1sX3N0cmluZ19vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX21hY2FkZHI4IiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGltZXN0YW1wX25vZGFfaW5zdGFudF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJJbnN0YW50Iiwibm90TnVsbCI6ZmFsc2V9fV0sImRlYnVnUmVxdWVzdCI6ZmFsc2UsInVzZUNlbnRyYWxQYWNrYWdlTWFuYWdlbWVudCI6ZmFsc2V9" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiTnBnc3FsTGVnYWN5RXhhbXBsZUdlbiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6W3siY29sdW1uIjoiR2V0UG9zdGdyZXNGdW5jdGlvbnM6bWF4X2ludGVnZXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiaW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFBvc3RncmVzRnVuY3Rpb25zOm1heF92YXJjaGFyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRQb3N0Z3Jlc0Z1bmN0aW9uczptYXhfdGltZXN0YW1wIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6dHJ1ZX19LHsiY29sdW1uIjoiR2V0UG9zdGdyZXNTcGVjaWFsVHlwZXNDbnQ6Y19qc29uIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikpzb25FbGVtZW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFBvc3RncmVzU3BlY2lhbFR5cGVzQ250OmNfanNvbmIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSnNvbkVsZW1lbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2pzb25fc3RyaW5nX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfeG1sX3N0cmluZ19vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX21hY2FkZHI4IiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGltZXN0YW1wX25vZGFfaW5zdGFudF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJJbnN0YW50Iiwibm90TnVsbCI6ZmFsc2V9fV0sImRlYnVnUmVxdWVzdCI6ZmFsc2UsInVzZUNlbnRyYWxQYWNrYWdlTWFuYWdlbWVudCI6ZmFsc2UsIndpdGhBc3luY1N1ZmZpeCI6dHJ1ZX0=" } \ No newline at end of file diff --git a/examples/NpgsqlLegacyExample/request.message b/examples/NpgsqlLegacyExample/request.message index 3a567a39..51759dfb 100644 --- a/examples/NpgsqlLegacyExample/request.message +++ b/examples/NpgsqlLegacyExample/request.message @@ -10917,4 +10917,4 @@ hSELECT c_point, c_line, c_lseg, c_box, c_path, c_polygon, c_circle FROM postgre c_path0ÿÿÿÿÿÿÿÿÿRpostgres_geometric_typesbpathzc_path"H c_polygon0ÿÿÿÿÿÿÿÿÿRpostgres_geometric_typesb polygonz c_polygon"E c_circle0ÿÿÿÿÿÿÿÿÿRpostgres_geometric_typesbcirclezc_circle: query.sqlU -'TRUNCATE TABLE postgres_geometric_typesTruncatePostgresGeoTypes:exec: query.sql"v1.30.0*¬{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"netstandard2.0","namespaceName":"NpgsqlLegacyExampleGen","useDapper":false,"overrideDapperVersion":"","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}}],"debugRequest":false,"useCentralPackageManagement":false} \ No newline at end of file +'TRUNCATE TABLE postgres_geometric_typesTruncatePostgresGeoTypes:exec: query.sql"v1.30.0*Ã{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"netstandard2.0","namespaceName":"NpgsqlLegacyExampleGen","useDapper":false,"overrideDapperVersion":"","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}}],"debugRequest":false,"useCentralPackageManagement":false,"withAsyncSuffix":true} \ No newline at end of file diff --git a/examples/QuickStartMySqlDalGen/QuerySql.cs b/examples/QuickStartMySqlDalGen/QuerySql.cs index 4573b422..3dceeec2 100644 --- a/examples/QuickStartMySqlDalGen/QuerySql.cs +++ b/examples/QuickStartMySqlDalGen/QuerySql.cs @@ -40,7 +40,7 @@ public static QuerySql WithTransaction(MySqlTransaction transaction) private const string GetAuthorSql = "SELECT id, name, bio FROM authors WHERE name = @name LIMIT 1"; public readonly record struct GetAuthorRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorArgs(string Name); - public async Task GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { if (this.Transaction == null) { @@ -98,7 +98,7 @@ ORDER BY name LIMIT @limit OFFSET @offset"; public readonly record struct ListAuthorsRow(long Id, string Name, string? Bio); public readonly record struct ListAuthorsArgs(int Limit, int Offset); - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { if (this.Transaction == null) { @@ -140,7 +140,7 @@ public async Task> ListAuthors(ListAuthorsArgs args) private const string CreateAuthorSql = "INSERT INTO authors (id, name, bio) VALUES (@id, @name, @bio)"; public readonly record struct CreateAuthorArgs(long Id, string Name, string? Bio); - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { if (this.Transaction == null) { @@ -174,7 +174,7 @@ public async Task CreateAuthor(CreateAuthorArgs args) private const string CreateAuthorReturnIdSql = "INSERT INTO authors (name, bio) VALUES (@name, @bio)"; public readonly record struct CreateAuthorReturnIdArgs(string Name, string? Bio); - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { if (this.Transaction == null) { @@ -207,7 +207,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) private const string GetAuthorByIdSql = "SELECT id, name, bio FROM authors WHERE id = @id LIMIT 1"; public readonly record struct GetAuthorByIdRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorByIdArgs(long Id); - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { if (this.Transaction == null) { @@ -263,7 +263,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) WHERE name LIKE COALESCE(@name_pattern, '%')"; public readonly record struct GetAuthorByNamePatternRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorByNamePatternArgs(string? NamePattern); - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { if (this.Transaction == null) { @@ -304,7 +304,7 @@ public async Task> GetAuthorByNamePattern(GetAut private const string DeleteAuthorSql = @"DELETE FROM authors WHERE name = @name"; public readonly record struct DeleteAuthorArgs(string Name); - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { if (this.Transaction == null) { @@ -333,7 +333,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) } private const string DeleteAllAuthorsSql = "DELETE FROM authors"; - public async Task DeleteAllAuthors() + public async Task DeleteAllAuthorsAsync() { if (this.Transaction == null) { @@ -363,7 +363,7 @@ public async Task DeleteAllAuthors() SET bio = @bio WHERE bio IS NOT NULL"; public readonly record struct UpdateAuthorsArgs(string? Bio); - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { if (this.Transaction == null) { @@ -392,7 +392,7 @@ public async Task UpdateAuthors(UpdateAuthorsArgs args) private const string GetAuthorsByIdsSql = "SELECT id, name, bio FROM authors WHERE id IN (/*SLICE:ids*/@ids)"; public readonly record struct GetAuthorsByIdsRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsArgs(long[] Ids); - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var transformedSql = GetAuthorsByIdsSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -437,7 +437,7 @@ public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs private const string GetAuthorsByIdsAndNamesSql = "SELECT id, name, bio FROM authors WHERE id IN (/*SLICE:ids*/@ids) AND name IN (/*SLICE:names*/@names)"; public readonly record struct GetAuthorsByIdsAndNamesRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsAndNamesArgs(long[] Ids, string[] Names); - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var transformedSql = GetAuthorsByIdsAndNamesSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -486,7 +486,7 @@ public async Task> GetAuthorsByIdsAndNames(GetA private const string CreateBookSql = "INSERT INTO books (name, author_id) VALUES (@name, @author_id)"; public readonly record struct CreateBookArgs(string Name, long AuthorId); - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { if (this.Transaction == null) { @@ -520,7 +520,7 @@ public async Task CreateBook(CreateBookArgs args) FROM authors JOIN books ON authors.id = books.author_id ORDER BY authors.name"; public readonly record struct ListAllAuthorsBooksRow(Author? Author, Book? Book); - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -560,7 +560,7 @@ public async Task> ListAllAuthorsBooks() FROM authors authors1 JOIN authors authors2 ON authors1.name = authors2.name WHERE authors1.id < authors2.id"; public readonly record struct GetDuplicateAuthorsRow(Author? Author, Author? Author2); - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -601,7 +601,7 @@ public async Task> GetDuplicateAuthors() WHERE books.name = @name"; public readonly record struct GetAuthorsByBookNameRow(long Id, string Name, string? Bio, Book? Book); public readonly record struct GetAuthorsByBookNameArgs(string Name); - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -641,7 +641,7 @@ public async Task> GetAuthorsByBookName(GetAuthors private const string CreateExtendedBioSql = "INSERT INTO extended.bios (author_name, name, bio_type, author_type) VALUES (@author_name, @name, @bio_type, @author_type)"; public readonly record struct CreateExtendedBioArgs(string? AuthorName, string? Name, BiosBioType? BioType, HashSet? AuthorType); - public async Task CreateExtendedBio(CreateExtendedBioArgs args) + public async Task CreateExtendedBioAsync(CreateExtendedBioArgs args) { if (this.Transaction == null) { @@ -678,7 +678,7 @@ public async Task CreateExtendedBio(CreateExtendedBioArgs args) private const string GetFirstExtendedBioByTypeSql = "SELECT author_name, name, bio_type, author_type FROM extended.bios WHERE bio_type = @bio_type LIMIT 1"; public readonly record struct GetFirstExtendedBioByTypeRow(string? AuthorName, string? Name, BiosBioType? BioType, HashSet? AuthorType); public readonly record struct GetFirstExtendedBioByTypeArgs(BiosBioType? BioType); - public async Task GetFirstExtendedBioByType(GetFirstExtendedBioByTypeArgs args) + public async Task GetFirstExtendedBioByTypeAsync(GetFirstExtendedBioByTypeArgs args) { if (this.Transaction == null) { @@ -733,7 +733,7 @@ public async Task CreateExtendedBio(CreateExtendedBioArgs args) } private const string TruncateExtendedBiosSql = "TRUNCATE TABLE extended.bios"; - public async Task TruncateExtendedBios() + public async Task TruncateExtendedBiosAsync() { if (this.Transaction == null) { diff --git a/examples/QuickStartMySqlDalGen/request.json b/examples/QuickStartMySqlDalGen/request.json index 85a1062b..60686250 100644 --- a/examples/QuickStartMySqlDalGen/request.json +++ b/examples/QuickStartMySqlDalGen/request.json @@ -1045,5 +1045,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6bnVsbCwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZX0=" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6bnVsbCwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZSwid2l0aEFzeW5jU3VmZml4Ijp0cnVlfQ==" } \ No newline at end of file diff --git a/examples/QuickStartMySqlDalGen/request.message b/examples/QuickStartMySqlDalGen/request.message index fddafbaffcb2019182b6a4d1a6f45edcad0850e0..9923489e1096ecaafaf44f3b3ed9adfea70dbad6 100644 GIT binary patch delta 38 tcmaE+`&V}ZuNdRI$$VnhC3KX^GfOfYi!1YzgG GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { if (this.Transaction == null) { @@ -97,7 +97,7 @@ LIMIT @limit OFFSET @offset"; public readonly record struct ListAuthorsRow(long Id, string Name, string? Bio); public readonly record struct ListAuthorsArgs(int Offset, int Limit); - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { if (this.Transaction == null) { @@ -139,7 +139,7 @@ public async Task> ListAuthors(ListAuthorsArgs args) private const string CreateAuthorSql = "INSERT INTO authors (id, name, bio) VALUES (@id, @name, @bio) RETURNING id, name, bio"; public readonly record struct CreateAuthorRow(long Id, string Name, string? Bio); public readonly record struct CreateAuthorArgs(long Id, string Name, string? Bio); - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { if (this.Transaction == null) { @@ -197,7 +197,7 @@ public async Task> ListAuthors(ListAuthorsArgs args) private const string CreateAuthorReturnIdSql = "INSERT INTO authors (name, bio) VALUES (@name, @bio) RETURNING id"; public readonly record struct CreateAuthorReturnIdRow(long Id); public readonly record struct CreateAuthorReturnIdArgs(string Name, string? Bio); - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { if (this.Transaction == null) { @@ -230,7 +230,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) WHERE id = @id LIMIT 1"; public readonly record struct GetAuthorByIdRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorByIdArgs(long Id); - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { if (this.Transaction == null) { @@ -285,7 +285,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) WHERE name LIKE COALESCE(@name_pattern, '%')"; public readonly record struct GetAuthorByNamePatternRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorByNamePatternArgs(string? NamePattern); - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { if (this.Transaction == null) { @@ -325,7 +325,7 @@ public async Task> GetAuthorByNamePattern(GetAut private const string DeleteAuthorSql = @"DELETE FROM authors WHERE name = @name"; public readonly record struct DeleteAuthorArgs(string Name); - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { if (this.Transaction == null) { @@ -353,7 +353,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) } private const string TruncateAuthorsSql = "TRUNCATE TABLE authors CASCADE"; - public async Task TruncateAuthors() + public async Task TruncateAuthorsAsync() { if (this.Transaction == null) { @@ -382,7 +382,7 @@ public async Task TruncateAuthors() SET bio = @bio WHERE bio IS NOT NULL"; public readonly record struct UpdateAuthorsArgs(string? Bio); - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { if (this.Transaction == null) { @@ -411,7 +411,7 @@ public async Task UpdateAuthors(UpdateAuthorsArgs args) WHERE id = ANY(@longArr_1::BIGINT [])"; public readonly record struct GetAuthorsByIdsRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsArgs(long[] LongArr1); - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { if (this.Transaction == null) { @@ -453,7 +453,7 @@ FROM authors WHERE id = ANY(@longArr_1::BIGINT []) AND name = ANY(@stringArr_2::TEXT [])"; public readonly record struct GetAuthorsByIdsAndNamesRow(long Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsAndNamesArgs(long[] LongArr1, string[] StringArr2); - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { if (this.Transaction == null) { @@ -495,7 +495,7 @@ public async Task> GetAuthorsByIdsAndNames(GetA private const string CreateBookSql = "INSERT INTO books (name, author_id) VALUES (@name, @author_id) RETURNING id"; public readonly record struct CreateBookRow(Guid Id); public readonly record struct CreateBookArgs(string Name, long AuthorId); - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { if (this.Transaction == null) { @@ -531,7 +531,7 @@ FROM authors INNER JOIN books ON authors.id = books.author_id ORDER BY authors.name"; public readonly record struct ListAllAuthorsBooksRow(Author? Author, Book? Book); - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -573,7 +573,7 @@ FROM authors AS authors1 INNER JOIN authors AS authors2 ON authors1.name = authors2.name WHERE authors1.id < authors2.id"; public readonly record struct GetDuplicateAuthorsRow(Author? Author, Author? Author2); - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -615,7 +615,7 @@ public async Task> GetDuplicateAuthors() WHERE books.name = @name"; public readonly record struct GetAuthorsByBookNameRow(long Id, string Name, string? Bio, Book? Book); public readonly record struct GetAuthorsByBookNameArgs(string Name); - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -654,7 +654,7 @@ public async Task> GetAuthorsByBookName(GetAuthors private const string CreateExtendedBioSql = "INSERT INTO extended.bios (author_name, name, bio_type) VALUES (@author_name, @name, @bio_type)"; public readonly record struct CreateExtendedBioArgs(string AuthorName, string Name, ExtendedBioType? BioType); - public async Task CreateExtendedBio(CreateExtendedBioArgs args) + public async Task CreateExtendedBioAsync(CreateExtendedBioArgs args) { if (this.Transaction == null) { @@ -688,7 +688,7 @@ public async Task CreateExtendedBio(CreateExtendedBioArgs args) private const string GetFirstExtendedBioByTypeSql = "SELECT author_name, name, bio_type FROM extended.bios WHERE bio_type = @bio_type LIMIT 1"; public readonly record struct GetFirstExtendedBioByTypeRow(string AuthorName, string Name, ExtendedBioType? BioType); public readonly record struct GetFirstExtendedBioByTypeArgs(ExtendedBioType? BioType); - public async Task GetFirstExtendedBioByType(GetFirstExtendedBioByTypeArgs args) + public async Task GetFirstExtendedBioByTypeAsync(GetFirstExtendedBioByTypeArgs args) { if (this.Transaction == null) { @@ -740,7 +740,7 @@ public async Task CreateExtendedBio(CreateExtendedBioArgs args) } private const string TruncateExtendedBiosSql = "TRUNCATE TABLE extended.bios"; - public async Task TruncateExtendedBios() + public async Task TruncateExtendedBiosAsync() { if (this.Transaction == null) { diff --git a/examples/QuickStartPostgresDalGen/request.json b/examples/QuickStartPostgresDalGen/request.json index 9f2b035f..1de65223 100644 --- a/examples/QuickStartPostgresDalGen/request.json +++ b/examples/QuickStartPostgresDalGen/request.json @@ -32907,5 +32907,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6bnVsbCwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZX0=" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6bnVsbCwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZSwid2l0aEFzeW5jU3VmZml4Ijp0cnVlfQ==" } \ No newline at end of file diff --git a/examples/QuickStartPostgresDalGen/request.message b/examples/QuickStartPostgresDalGen/request.message index 4aedbace..e30de7ae 100644 --- a/examples/QuickStartPostgresDalGen/request.message +++ b/examples/QuickStartPostgresDalGen/request.message @@ -10244,4 +10244,4 @@ pg_catalogvarcharz author_name"B pg_catalogvarcharzname"G bio_type0ÿÿÿÿÿÿÿÿÿRextendedbiosbextendedbio_typezbio_type*JF bio_type0ÿÿÿÿÿÿÿÿÿRextendedbiosbextended.bio_typezbio_type: query.sqlF -TRUNCATE TABLE extended.biosTruncateExtendedBios:exec: query.sql"v1.30.0*×{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"net8.0","namespaceName":"","useDapper":false,"overrideDapperVersion":"","overrides":null,"debugRequest":false,"useCentralPackageManagement":false} \ No newline at end of file +TRUNCATE TABLE extended.biosTruncateExtendedBios:exec: query.sql"v1.30.0*î{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"net8.0","namespaceName":"","useDapper":false,"overrideDapperVersion":"","overrides":null,"debugRequest":false,"useCentralPackageManagement":false,"withAsyncSuffix":true} \ No newline at end of file diff --git a/examples/QuickStartSqliteDalGen/QuerySql.cs b/examples/QuickStartSqliteDalGen/QuerySql.cs index 8577870d..f3734618 100644 --- a/examples/QuickStartSqliteDalGen/QuerySql.cs +++ b/examples/QuickStartSqliteDalGen/QuerySql.cs @@ -38,7 +38,7 @@ public static QuerySql WithTransaction(SqliteTransaction transaction) WHERE name = @name LIMIT 1"; public readonly record struct GetAuthorRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorArgs(string Name); - public async Task GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { if (this.Transaction == null) { @@ -96,7 +96,7 @@ ORDER BY name LIMIT @limit OFFSET @offset"; public readonly record struct ListAuthorsRow(int Id, string Name, string? Bio); public readonly record struct ListAuthorsArgs(int Offset, int Limit); - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { if (this.Transaction == null) { @@ -138,7 +138,7 @@ public async Task> ListAuthors(ListAuthorsArgs args) private const string CreateAuthorSql = "INSERT INTO authors (id, name, bio) VALUES (@id, @name, @bio)"; public readonly record struct CreateAuthorArgs(int Id, string Name, string? Bio); - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { if (this.Transaction == null) { @@ -173,7 +173,7 @@ public async Task CreateAuthor(CreateAuthorArgs args) private const string CreateAuthorReturnIdSql = "INSERT INTO authors (name, bio) VALUES (@name, @bio) RETURNING id"; public readonly record struct CreateAuthorReturnIdRow(int Id); public readonly record struct CreateAuthorReturnIdArgs(string Name, string? Bio); - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { if (this.Transaction == null) { @@ -207,7 +207,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) WHERE id = @id LIMIT 1"; public readonly record struct GetAuthorByIdRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorByIdArgs(int Id); - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { if (this.Transaction == null) { @@ -262,7 +262,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) private const string GetAuthorByIdWithMultipleNamedParamSql = "SELECT id, name, bio FROM authors WHERE id = @id_arg AND id = @id_arg LIMIT @take"; public readonly record struct GetAuthorByIdWithMultipleNamedParamRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorByIdWithMultipleNamedParamArgs(int IdArg, int? Take); - public async Task GetAuthorByIdWithMultipleNamedParam(GetAuthorByIdWithMultipleNamedParamArgs args) + public async Task GetAuthorByIdWithMultipleNamedParamAsync(GetAuthorByIdWithMultipleNamedParamArgs args) { if (this.Transaction == null) { @@ -320,7 +320,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) WHERE name LIKE COALESCE(@name_pattern, '%')"; public readonly record struct GetAuthorByNamePatternRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorByNamePatternArgs(string? NamePattern); - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { if (this.Transaction == null) { @@ -362,7 +362,7 @@ public async Task> GetAuthorByNamePattern(GetAut SET bio = @bio WHERE bio IS NOT NULL"; public readonly record struct UpdateAuthorsArgs(string? Bio); - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { if (this.Transaction == null) { @@ -391,7 +391,7 @@ public async Task UpdateAuthors(UpdateAuthorsArgs args) private const string GetAuthorsByIdsSql = "SELECT id, name, bio FROM authors WHERE id IN (/*SLICE:ids*/@ids)"; public readonly record struct GetAuthorsByIdsRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsArgs(int[] Ids); - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var transformedSql = GetAuthorsByIdsSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -436,7 +436,7 @@ public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs private const string GetAuthorsByIdsAndNamesSql = "SELECT id, name, bio FROM authors WHERE id IN (/*SLICE:ids*/@ids) AND name IN (/*SLICE:names*/@names)"; public readonly record struct GetAuthorsByIdsAndNamesRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsAndNamesArgs(int[] Ids, string[] Names); - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var transformedSql = GetAuthorsByIdsAndNamesSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -486,7 +486,7 @@ public async Task> GetAuthorsByIdsAndNames(GetA private const string DeleteAuthorSql = @"DELETE FROM authors WHERE name = @name"; public readonly record struct DeleteAuthorArgs(string Name); - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { if (this.Transaction == null) { @@ -517,7 +517,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) private const string CreateBookSql = "INSERT INTO books (name, author_id) VALUES (@name, @author_id) RETURNING id"; public readonly record struct CreateBookRow(int Id); public readonly record struct CreateBookArgs(string Name, int AuthorId); - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { if (this.Transaction == null) { @@ -553,7 +553,7 @@ public async Task CreateBook(CreateBookArgs args) FROM authors INNER JOIN books ON authors.id = books.author_id ORDER BY authors.name"; public readonly record struct ListAllAuthorsBooksRow(Author? Author, Book? Book); - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -596,7 +596,7 @@ FROM authors AS authors1 INNER JOIN authors AS authors2 ON authors1.name = authors2.name WHERE authors1.id < authors2.id"; public readonly record struct GetDuplicateAuthorsRow(Author? Author, Author? Author2); - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -639,7 +639,7 @@ public async Task> GetDuplicateAuthors() WHERE books.name = @name"; public readonly record struct GetAuthorsByBookNameRow(int Id, string Name, string? Bio, Book? Book); public readonly record struct GetAuthorsByBookNameArgs(string Name); - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -678,7 +678,7 @@ public async Task> GetAuthorsByBookName(GetAuthors } private const string DeleteAllAuthorsSql = "DELETE FROM authors"; - public async Task DeleteAllAuthors() + public async Task DeleteAllAuthorsAsync() { if (this.Transaction == null) { diff --git a/examples/QuickStartSqliteDalGen/request.json b/examples/QuickStartSqliteDalGen/request.json index b349a1ff..377ae51f 100644 --- a/examples/QuickStartSqliteDalGen/request.json +++ b/examples/QuickStartSqliteDalGen/request.json @@ -920,5 +920,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6bnVsbCwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZX0=" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6bnVsbCwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZSwid2l0aEFzeW5jU3VmZml4Ijp0cnVlfQ==" } \ No newline at end of file diff --git a/examples/QuickStartSqliteDalGen/request.message b/examples/QuickStartSqliteDalGen/request.message index 6601628171580d2740ee742c04e1d73d98d714de..c0dd4f71c3fc012ee0e4c6829737729afbcbe991 100644 GIT binary patch delta 38 tcmdm^aam(SvM}Sj$tl9uC3KX^GfOfYi!1YzgG`4 diff --git a/examples/SqliteDapperExample/QuerySql.cs b/examples/SqliteDapperExample/QuerySql.cs index df85f28b..2e2b8d96 100644 --- a/examples/SqliteDapperExample/QuerySql.cs +++ b/examples/SqliteDapperExample/QuerySql.cs @@ -52,7 +52,7 @@ public class GetAuthorArgs { public required string Name { get; init; } }; - public async Task GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -85,7 +85,7 @@ public class ListAuthorsArgs public required int Offset { get; init; } public required int Limit { get; init; } }; - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("offset", args.Offset); @@ -111,7 +111,7 @@ public class CreateAuthorArgs public required string Name { get; init; } public string? Bio { get; init; } }; - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -139,7 +139,7 @@ public class CreateAuthorReturnIdArgs public required string Name { get; init; } public string? Bio { get; init; } }; - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -167,7 +167,7 @@ public class GetAuthorByIdArgs { public required int Id { get; init; } }; - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -197,7 +197,7 @@ public class GetAuthorByIdWithMultipleNamedParamArgs public required int IdArg { get; init; } public int? Take { get; init; } }; - public async Task GetAuthorByIdWithMultipleNamedParam(GetAuthorByIdWithMultipleNamedParamArgs args) + public async Task GetAuthorByIdWithMultipleNamedParamAsync(GetAuthorByIdWithMultipleNamedParamArgs args) { var queryParams = new Dictionary(); queryParams.Add("id_arg", args.IdArg); @@ -228,7 +228,7 @@ public class GetAuthorByNamePatternArgs { public string? NamePattern { get; init; } }; - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { var queryParams = new Dictionary(); queryParams.Add("name_pattern", args.NamePattern); @@ -253,7 +253,7 @@ public class UpdateAuthorsArgs { public string? Bio { get; init; } }; - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("bio", args.Bio); @@ -279,7 +279,7 @@ public class GetAuthorsByIdsArgs { public required int[] Ids { get; init; } }; - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var transformedSql = GetAuthorsByIdsSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -312,7 +312,7 @@ public class GetAuthorsByIdsAndNamesArgs public required int[] Ids { get; init; } public required string[] Names { get; init; } }; - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var transformedSql = GetAuthorsByIdsAndNamesSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -342,7 +342,7 @@ public class DeleteAuthorArgs { public required string Name { get; init; } }; - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -368,7 +368,7 @@ public class CreateBookArgs public required string Name { get; init; } public required int AuthorId { get; init; } }; - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -394,7 +394,7 @@ public class ListAllAuthorsBooksRow public required Author? Author { get; init; } public required Book? Book { get; init; } }; - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -441,7 +441,7 @@ public class GetDuplicateAuthorsRow public required Author? Author { get; init; } public required Author? Author2 { get; init; } }; - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -493,7 +493,7 @@ public class GetAuthorsByBookNameArgs { public required string Name { get; init; } }; - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -532,7 +532,7 @@ public async Task> GetAuthorsByBookName(GetAuthors } private const string DeleteAllAuthorsSql = "DELETE FROM authors"; - public async Task DeleteAllAuthors() + public async Task DeleteAllAuthorsAsync() { if (this.Transaction == null) { @@ -573,7 +573,7 @@ public class InsertSqliteTypesArgs public bool? CTextBoolOverride { get; init; } public bool? CIntegerBoolOverride { get; init; } }; - public async Task InsertSqliteTypes(InsertSqliteTypesArgs args) + public async Task InsertSqliteTypesAsync(InsertSqliteTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_integer", args.CInteger); @@ -605,7 +605,7 @@ public class InsertSqliteTypesBatchArgs public decimal? CReal { get; init; } public string? CText { get; init; } }; - public async Task InsertSqliteTypesBatch(List args) + public async Task InsertSqliteTypesBatchAsync(List args) { using (var connection = new SqliteConnection(ConnectionString)) { @@ -651,7 +651,7 @@ public class GetSqliteTypesRow public bool? CTextBoolOverride { get; init; } public bool? CIntegerBoolOverride { get; init; } }; - public async Task GetSqliteTypes() + public async Task GetSqliteTypesAsync() { if (this.Transaction == null) { @@ -684,7 +684,7 @@ public class GetSqliteTypesCntRow public byte[]? CBlob { get; init; } public required int Cnt { get; init; } }; - public async Task GetSqliteTypesCnt() + public async Task GetSqliteTypesCntAsync() { if (this.Transaction == null) { @@ -711,7 +711,7 @@ public class GetSqliteFunctionsRow public decimal? MaxReal { get; init; } public object? MaxText { get; init; } }; - public async Task GetSqliteFunctions() + public async Task GetSqliteFunctionsAsync() { if (this.Transaction == null) { @@ -728,7 +728,7 @@ public class GetSqliteFunctionsRow } private const string DeleteAllSqliteTypesSql = "DELETE FROM types_sqlite"; - public async Task DeleteAllSqliteTypes() + public async Task DeleteAllSqliteTypesAsync() { if (this.Transaction == null) { diff --git a/examples/SqliteDapperExample/request.json b/examples/SqliteDapperExample/request.json index 597f4c15..1c6dc562 100644 --- a/examples/SqliteDapperExample/request.json +++ b/examples/SqliteDapperExample/request.json @@ -1463,5 +1463,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IlNxbGl0ZURhcHBlckV4YW1wbGVHZW4iLCJ1c2VEYXBwZXIiOnRydWUsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6W3siY29sdW1uIjoiR2V0U3FsaXRlRnVuY3Rpb25zOm1heF9pbnRlZ2VyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImludCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRTcWxpdGVGdW5jdGlvbnM6bWF4X3ZhcmNoYXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFNxbGl0ZUZ1bmN0aW9uczptYXhfcmVhbCIsImNzaGFycF90eXBlIjp7InR5cGUiOiJkZWNpbWFsIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190ZXh0X2RhdGV0aW1lX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y19pbnRlZ2VyX2RhdGV0aW1lX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190ZXh0X2Jvb2xfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiYm9vbCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfaW50ZWdlcl9ib29sX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImJvb2wiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RleHRfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2ludGVnZXJfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19XSwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZX0=" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IlNxbGl0ZURhcHBlckV4YW1wbGVHZW4iLCJ1c2VEYXBwZXIiOnRydWUsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6W3siY29sdW1uIjoiR2V0U3FsaXRlRnVuY3Rpb25zOm1heF9pbnRlZ2VyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImludCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRTcWxpdGVGdW5jdGlvbnM6bWF4X3ZhcmNoYXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFNxbGl0ZUZ1bmN0aW9uczptYXhfcmVhbCIsImNzaGFycF90eXBlIjp7InR5cGUiOiJkZWNpbWFsIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190ZXh0X2RhdGV0aW1lX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y19pbnRlZ2VyX2RhdGV0aW1lX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190ZXh0X2Jvb2xfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiYm9vbCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfaW50ZWdlcl9ib29sX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImJvb2wiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RleHRfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2ludGVnZXJfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19XSwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZSwid2l0aEFzeW5jU3VmZml4Ijp0cnVlfQ==" } \ No newline at end of file diff --git a/examples/SqliteDapperExample/request.message b/examples/SqliteDapperExample/request.message index 0502bc91e560bf0aac275f8771afd1a0faf98b33..6d63bf6b4605d351080be02e06dec22ea0bf818a 100644 GIT binary patch delta 39 vcmZ1)x+iqQ1U1H0n GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -86,7 +86,7 @@ public class ListAuthorsArgs public int Offset { get; set; } public int Limit { get; set; } }; - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("offset", args.Offset); @@ -112,7 +112,7 @@ public class CreateAuthorArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -140,7 +140,7 @@ public class CreateAuthorReturnIdArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -168,7 +168,7 @@ public class GetAuthorByIdArgs { public int Id { get; set; } }; - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { var queryParams = new Dictionary(); queryParams.Add("id", args.Id); @@ -198,7 +198,7 @@ public class GetAuthorByIdWithMultipleNamedParamArgs public int IdArg { get; set; } public int? Take { get; set; } }; - public async Task GetAuthorByIdWithMultipleNamedParam(GetAuthorByIdWithMultipleNamedParamArgs args) + public async Task GetAuthorByIdWithMultipleNamedParamAsync(GetAuthorByIdWithMultipleNamedParamArgs args) { var queryParams = new Dictionary(); queryParams.Add("id_arg", args.IdArg); @@ -229,7 +229,7 @@ public class GetAuthorByNamePatternArgs { public string NamePattern { get; set; } }; - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { var queryParams = new Dictionary(); queryParams.Add("name_pattern", args.NamePattern); @@ -254,7 +254,7 @@ public class UpdateAuthorsArgs { public string Bio { get; set; } }; - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { var queryParams = new Dictionary(); queryParams.Add("bio", args.Bio); @@ -280,7 +280,7 @@ public class GetAuthorsByIdsArgs { public int[] Ids { get; set; } }; - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var transformedSql = GetAuthorsByIdsSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -313,7 +313,7 @@ public class GetAuthorsByIdsAndNamesArgs public int[] Ids { get; set; } public string[] Names { get; set; } }; - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var transformedSql = GetAuthorsByIdsAndNamesSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -343,7 +343,7 @@ public class DeleteAuthorArgs { public string Name { get; set; } }; - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -369,7 +369,7 @@ public class CreateBookArgs public string Name { get; set; } public int AuthorId { get; set; } }; - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { var queryParams = new Dictionary(); queryParams.Add("name", args.Name); @@ -395,7 +395,7 @@ public class ListAllAuthorsBooksRow public Author Author { get; set; } public Book Book { get; set; } }; - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -442,7 +442,7 @@ public class GetDuplicateAuthorsRow public Author Author { get; set; } public Author Author2 { get; set; } }; - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -494,7 +494,7 @@ public class GetAuthorsByBookNameArgs { public string Name { get; set; } }; - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -533,7 +533,7 @@ public async Task> GetAuthorsByBookName(GetAuthors } private const string DeleteAllAuthorsSql = "DELETE FROM authors"; - public async Task DeleteAllAuthors() + public async Task DeleteAllAuthorsAsync() { if (this.Transaction == null) { @@ -574,7 +574,7 @@ public class InsertSqliteTypesArgs public bool? CTextBoolOverride { get; set; } public bool? CIntegerBoolOverride { get; set; } }; - public async Task InsertSqliteTypes(InsertSqliteTypesArgs args) + public async Task InsertSqliteTypesAsync(InsertSqliteTypesArgs args) { var queryParams = new Dictionary(); queryParams.Add("c_integer", args.CInteger); @@ -606,7 +606,7 @@ public class InsertSqliteTypesBatchArgs public decimal? CReal { get; set; } public string CText { get; set; } }; - public async Task InsertSqliteTypesBatch(List args) + public async Task InsertSqliteTypesBatchAsync(List args) { using (var connection = new SqliteConnection(ConnectionString)) { @@ -652,7 +652,7 @@ public class GetSqliteTypesRow public bool? CTextBoolOverride { get; set; } public bool? CIntegerBoolOverride { get; set; } }; - public async Task GetSqliteTypes() + public async Task GetSqliteTypesAsync() { if (this.Transaction == null) { @@ -685,7 +685,7 @@ public class GetSqliteTypesCntRow public byte[] CBlob { get; set; } public int Cnt { get; set; } }; - public async Task GetSqliteTypesCnt() + public async Task GetSqliteTypesCntAsync() { if (this.Transaction == null) { @@ -712,7 +712,7 @@ public class GetSqliteFunctionsRow public decimal? MaxReal { get; set; } public object MaxText { get; set; } }; - public async Task GetSqliteFunctions() + public async Task GetSqliteFunctionsAsync() { if (this.Transaction == null) { @@ -729,7 +729,7 @@ public async Task GetSqliteFunctions() } private const string DeleteAllSqliteTypesSql = "DELETE FROM types_sqlite"; - public async Task DeleteAllSqliteTypes() + public async Task DeleteAllSqliteTypesAsync() { if (this.Transaction == null) { diff --git a/examples/SqliteDapperLegacyExample/request.json b/examples/SqliteDapperLegacyExample/request.json index 4a08cf29..5bd7d803 100644 --- a/examples/SqliteDapperLegacyExample/request.json +++ b/examples/SqliteDapperLegacyExample/request.json @@ -1463,5 +1463,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiU3FsaXRlRGFwcGVyTGVnYWN5RXhhbXBsZUdlbiIsInVzZURhcHBlciI6dHJ1ZSwib3ZlcnJpZGVEYXBwZXJWZXJzaW9uIjoiIiwib3ZlcnJpZGVzIjpbeyJjb2x1bW4iOiJHZXRTcWxpdGVGdW5jdGlvbnM6bWF4X2ludGVnZXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiaW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFNxbGl0ZUZ1bmN0aW9uczptYXhfdmFyY2hhciIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0U3FsaXRlRnVuY3Rpb25zOm1heF9yZWFsIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImRlY2ltYWwiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RleHRfZGF0ZXRpbWVfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiRGF0ZVRpbWUiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2ludGVnZXJfZGF0ZXRpbWVfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiRGF0ZVRpbWUiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RleHRfYm9vbF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJib29sIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y19pbnRlZ2VyX2Jvb2xfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiYm9vbCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGV4dF9ub2RhX2luc3RhbnRfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSW5zdGFudCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfaW50ZWdlcl9ub2RhX2luc3RhbnRfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSW5zdGFudCIsIm5vdE51bGwiOmZhbHNlfX1dLCJkZWJ1Z1JlcXVlc3QiOmZhbHNlLCJ1c2VDZW50cmFsUGFja2FnZU1hbmFnZW1lbnQiOmZhbHNlfQ==" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiU3FsaXRlRGFwcGVyTGVnYWN5RXhhbXBsZUdlbiIsInVzZURhcHBlciI6dHJ1ZSwib3ZlcnJpZGVEYXBwZXJWZXJzaW9uIjoiIiwib3ZlcnJpZGVzIjpbeyJjb2x1bW4iOiJHZXRTcWxpdGVGdW5jdGlvbnM6bWF4X2ludGVnZXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiaW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFNxbGl0ZUZ1bmN0aW9uczptYXhfdmFyY2hhciIsImNzaGFycF90eXBlIjp7InR5cGUiOiJzdHJpbmciLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0U3FsaXRlRnVuY3Rpb25zOm1heF9yZWFsIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImRlY2ltYWwiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RleHRfZGF0ZXRpbWVfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiRGF0ZVRpbWUiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2ludGVnZXJfZGF0ZXRpbWVfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiRGF0ZVRpbWUiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RleHRfYm9vbF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJib29sIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y19pbnRlZ2VyX2Jvb2xfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiYm9vbCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGV4dF9ub2RhX2luc3RhbnRfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSW5zdGFudCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfaW50ZWdlcl9ub2RhX2luc3RhbnRfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiSW5zdGFudCIsIm5vdE51bGwiOmZhbHNlfX1dLCJkZWJ1Z1JlcXVlc3QiOmZhbHNlLCJ1c2VDZW50cmFsUGFja2FnZU1hbmFnZW1lbnQiOmZhbHNlLCJ3aXRoQXN5bmNTdWZmaXgiOnRydWV9" } \ No newline at end of file diff --git a/examples/SqliteDapperLegacyExample/request.message b/examples/SqliteDapperLegacyExample/request.message index 7ec8b8324205172cda4c187996a07ad12a10397e..c0c8e0f98873ec88d23c9d8b7f7f94a4f5dae1a4 100644 GIT binary patch delta 39 vcmX>edM|Xt5;evho0qC7vPkGCm1mY@I2KptB?p(LrDawqS(Ox(rq%)gKTi)- delta 16 YcmcZ?dOUQ)5;ew!o0qC7vM|;H078cbjQ{`u diff --git a/examples/SqliteExample/QuerySql.cs b/examples/SqliteExample/QuerySql.cs index 28dae146..3c10bf0b 100644 --- a/examples/SqliteExample/QuerySql.cs +++ b/examples/SqliteExample/QuerySql.cs @@ -41,7 +41,7 @@ public static QuerySql WithTransaction(SqliteTransaction transaction) WHERE name = @name LIMIT 1"; public readonly record struct GetAuthorRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorArgs(string Name); - public async Task GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { if (this.Transaction == null) { @@ -99,7 +99,7 @@ ORDER BY name LIMIT @limit OFFSET @offset"; public readonly record struct ListAuthorsRow(int Id, string Name, string? Bio); public readonly record struct ListAuthorsArgs(int Offset, int Limit); - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { if (this.Transaction == null) { @@ -141,7 +141,7 @@ public async Task> ListAuthors(ListAuthorsArgs args) private const string CreateAuthorSql = "INSERT INTO authors (id, name, bio) VALUES (@id, @name, @bio)"; public readonly record struct CreateAuthorArgs(int Id, string Name, string? Bio); - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { if (this.Transaction == null) { @@ -176,7 +176,7 @@ public async Task CreateAuthor(CreateAuthorArgs args) private const string CreateAuthorReturnIdSql = "INSERT INTO authors (name, bio) VALUES (@name, @bio) RETURNING id"; public readonly record struct CreateAuthorReturnIdRow(int Id); public readonly record struct CreateAuthorReturnIdArgs(string Name, string? Bio); - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { if (this.Transaction == null) { @@ -210,7 +210,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) WHERE id = @id LIMIT 1"; public readonly record struct GetAuthorByIdRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorByIdArgs(int Id); - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { if (this.Transaction == null) { @@ -265,7 +265,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) private const string GetAuthorByIdWithMultipleNamedParamSql = "SELECT id, name, bio FROM authors WHERE id = @id_arg AND id = @id_arg LIMIT @take"; public readonly record struct GetAuthorByIdWithMultipleNamedParamRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorByIdWithMultipleNamedParamArgs(int IdArg, int? Take); - public async Task GetAuthorByIdWithMultipleNamedParam(GetAuthorByIdWithMultipleNamedParamArgs args) + public async Task GetAuthorByIdWithMultipleNamedParamAsync(GetAuthorByIdWithMultipleNamedParamArgs args) { if (this.Transaction == null) { @@ -323,7 +323,7 @@ public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) WHERE name LIKE COALESCE(@name_pattern, '%')"; public readonly record struct GetAuthorByNamePatternRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorByNamePatternArgs(string? NamePattern); - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { if (this.Transaction == null) { @@ -365,7 +365,7 @@ public async Task> GetAuthorByNamePattern(GetAut SET bio = @bio WHERE bio IS NOT NULL"; public readonly record struct UpdateAuthorsArgs(string? Bio); - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { if (this.Transaction == null) { @@ -394,7 +394,7 @@ public async Task UpdateAuthors(UpdateAuthorsArgs args) private const string GetAuthorsByIdsSql = "SELECT id, name, bio FROM authors WHERE id IN (/*SLICE:ids*/@ids)"; public readonly record struct GetAuthorsByIdsRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsArgs(int[] Ids); - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var transformedSql = GetAuthorsByIdsSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -439,7 +439,7 @@ public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs private const string GetAuthorsByIdsAndNamesSql = "SELECT id, name, bio FROM authors WHERE id IN (/*SLICE:ids*/@ids) AND name IN (/*SLICE:names*/@names)"; public readonly record struct GetAuthorsByIdsAndNamesRow(int Id, string Name, string? Bio); public readonly record struct GetAuthorsByIdsAndNamesArgs(int[] Ids, string[] Names); - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var transformedSql = GetAuthorsByIdsAndNamesSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -489,7 +489,7 @@ public async Task> GetAuthorsByIdsAndNames(GetA private const string DeleteAuthorSql = @"DELETE FROM authors WHERE name = @name"; public readonly record struct DeleteAuthorArgs(string Name); - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { if (this.Transaction == null) { @@ -520,7 +520,7 @@ public async Task DeleteAuthor(DeleteAuthorArgs args) private const string CreateBookSql = "INSERT INTO books (name, author_id) VALUES (@name, @author_id) RETURNING id"; public readonly record struct CreateBookRow(int Id); public readonly record struct CreateBookArgs(string Name, int AuthorId); - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { if (this.Transaction == null) { @@ -556,7 +556,7 @@ public async Task CreateBook(CreateBookArgs args) FROM authors INNER JOIN books ON authors.id = books.author_id ORDER BY authors.name"; public readonly record struct ListAllAuthorsBooksRow(Author? Author, Book? Book); - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -599,7 +599,7 @@ FROM authors AS authors1 INNER JOIN authors AS authors2 ON authors1.name = authors2.name WHERE authors1.id < authors2.id"; public readonly record struct GetDuplicateAuthorsRow(Author? Author, Author? Author2); - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -642,7 +642,7 @@ public async Task> GetDuplicateAuthors() WHERE books.name = @name"; public readonly record struct GetAuthorsByBookNameRow(int Id, string Name, string? Bio, Book? Book); public readonly record struct GetAuthorsByBookNameArgs(string Name); - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -681,7 +681,7 @@ public async Task> GetAuthorsByBookName(GetAuthors } private const string DeleteAllAuthorsSql = "DELETE FROM authors"; - public async Task DeleteAllAuthors() + public async Task DeleteAllAuthorsAsync() { if (this.Transaction == null) { @@ -722,7 +722,7 @@ public async Task DeleteAllAuthors() ) VALUES (@c_integer, @c_real, @c_text, @c_blob, @c_text_datetime_override, @c_integer_datetime_override, @c_text_noda_instant_override, @c_integer_noda_instant_override, @c_text_bool_override, @c_integer_bool_override)"; public readonly record struct InsertSqliteTypesArgs(int? CInteger, decimal? CReal, string? CText, byte[]? CBlob, DateTime? CTextDatetimeOverride, DateTime? CIntegerDatetimeOverride, Instant? CTextNodaInstantOverride, Instant? CIntegerNodaInstantOverride, bool? CTextBoolOverride, bool? CIntegerBoolOverride); - public async Task InsertSqliteTypes(InsertSqliteTypesArgs args) + public async Task InsertSqliteTypesAsync(InsertSqliteTypesArgs args) { if (this.Transaction == null) { @@ -770,7 +770,7 @@ public async Task InsertSqliteTypes(InsertSqliteTypesArgs args) private const string InsertSqliteTypesBatchSql = "INSERT INTO types_sqlite (c_integer, c_real, c_text) VALUES (@c_integer, @c_real, @c_text)"; public readonly record struct InsertSqliteTypesBatchArgs(int? CInteger, decimal? CReal, string? CText); - public async Task InsertSqliteTypesBatch(List args) + public async Task InsertSqliteTypesBatchAsync(List args) { using (var connection = new SqliteConnection(ConnectionString)) { @@ -804,7 +804,7 @@ public async Task InsertSqliteTypesBatch(List args) FROM types_sqlite LIMIT 1"; public readonly record struct GetSqliteTypesRow(int? CInteger, decimal? CReal, string? CText, byte[]? CBlob, DateTime? CTextDatetimeOverride, DateTime? CIntegerDatetimeOverride, Instant? CTextNodaInstantOverride, Instant? CIntegerNodaInstantOverride, bool? CTextBoolOverride, bool? CIntegerBoolOverride); - public async Task GetSqliteTypes() + public async Task GetSqliteTypesAsync() { if (this.Transaction == null) { @@ -878,7 +878,7 @@ FROM types_sqlite GROUP BY c_integer, c_real, c_text, c_blob LIMIT 1"; public readonly record struct GetSqliteTypesCntRow(int? CInteger, decimal? CReal, string? CText, byte[]? CBlob, int Cnt); - public async Task GetSqliteTypesCnt() + public async Task GetSqliteTypesCntAsync() { if (this.Transaction == null) { @@ -938,7 +938,7 @@ FROM types_sqlite max(c_text) AS max_text FROM types_sqlite"; public readonly record struct GetSqliteFunctionsRow(int? MaxInteger, decimal? MaxReal, object? MaxText); - public async Task GetSqliteFunctions() + public async Task GetSqliteFunctionsAsync() { if (this.Transaction == null) { @@ -989,7 +989,7 @@ FROM types_sqlite } private const string DeleteAllSqliteTypesSql = "DELETE FROM types_sqlite"; - public async Task DeleteAllSqliteTypes() + public async Task DeleteAllSqliteTypesAsync() { if (this.Transaction == null) { diff --git a/examples/SqliteExample/request.json b/examples/SqliteExample/request.json index 0ab004eb..662c6466 100644 --- a/examples/SqliteExample/request.json +++ b/examples/SqliteExample/request.json @@ -1463,5 +1463,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IlNxbGl0ZUV4YW1wbGVHZW4iLCJ1c2VEYXBwZXIiOmZhbHNlLCJvdmVycmlkZURhcHBlclZlcnNpb24iOiIiLCJvdmVycmlkZXMiOlt7ImNvbHVtbiI6IkdldFNxbGl0ZUZ1bmN0aW9uczptYXhfaW50ZWdlciIsImNzaGFycF90eXBlIjp7InR5cGUiOiJpbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0U3FsaXRlRnVuY3Rpb25zOm1heF92YXJjaGFyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRTcWxpdGVGdW5jdGlvbnM6bWF4X3JlYWwiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiZGVjaW1hbCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGV4dF9kYXRldGltZV9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJEYXRlVGltZSIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfaW50ZWdlcl9kYXRldGltZV9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJEYXRlVGltZSIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGV4dF9ib29sX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImJvb2wiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2ludGVnZXJfYm9vbF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJib29sIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190ZXh0X25vZGFfaW5zdGFudF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJJbnN0YW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y19pbnRlZ2VyX25vZGFfaW5zdGFudF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJJbnN0YW50Iiwibm90TnVsbCI6ZmFsc2V9fV0sImRlYnVnUmVxdWVzdCI6ZmFsc2UsInVzZUNlbnRyYWxQYWNrYWdlTWFuYWdlbWVudCI6ZmFsc2V9" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IlNxbGl0ZUV4YW1wbGVHZW4iLCJ1c2VEYXBwZXIiOmZhbHNlLCJvdmVycmlkZURhcHBlclZlcnNpb24iOiIiLCJvdmVycmlkZXMiOlt7ImNvbHVtbiI6IkdldFNxbGl0ZUZ1bmN0aW9uczptYXhfaW50ZWdlciIsImNzaGFycF90eXBlIjp7InR5cGUiOiJpbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiR2V0U3FsaXRlRnVuY3Rpb25zOm1heF92YXJjaGFyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6InN0cmluZyIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRTcWxpdGVGdW5jdGlvbnM6bWF4X3JlYWwiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiZGVjaW1hbCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGV4dF9kYXRldGltZV9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJEYXRlVGltZSIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfaW50ZWdlcl9kYXRldGltZV9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJEYXRlVGltZSIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfdGV4dF9ib29sX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImJvb2wiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2ludGVnZXJfYm9vbF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJib29sIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190ZXh0X25vZGFfaW5zdGFudF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJJbnN0YW50Iiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y19pbnRlZ2VyX25vZGFfaW5zdGFudF9vdmVycmlkZSIsImNzaGFycF90eXBlIjp7InR5cGUiOiJJbnN0YW50Iiwibm90TnVsbCI6ZmFsc2V9fV0sImRlYnVnUmVxdWVzdCI6ZmFsc2UsInVzZUNlbnRyYWxQYWNrYWdlTWFuYWdlbWVudCI6ZmFsc2UsIndpdGhBc3luY1N1ZmZpeCI6dHJ1ZX0=" } \ No newline at end of file diff --git a/examples/SqliteExample/request.message b/examples/SqliteExample/request.message index d7fca134ceb2d4500d0d31b994efde11bfd8c891..7e01765dc20e44c4d44ecdaeb286bde36b1b77a5 100644 GIT binary patch delta 39 ucmbOlx+Zi(s~Y3d&24IYED}0O<(VZJj>VOE$-$**X_*yDRwYHHskHzkhz^VZ delta 16 XcmZ1zIyH1ds~Th9<~B7x7RFitIk*MI diff --git a/examples/SqliteLegacyExample/QuerySql.cs b/examples/SqliteLegacyExample/QuerySql.cs index 844da110..af32b735 100644 --- a/examples/SqliteLegacyExample/QuerySql.cs +++ b/examples/SqliteLegacyExample/QuerySql.cs @@ -50,7 +50,7 @@ public class GetAuthorArgs { public string Name { get; set; } }; - public async Task GetAuthor(GetAuthorArgs args) + public async Task GetAuthorAsync(GetAuthorArgs args) { if (this.Transaction == null) { @@ -117,7 +117,7 @@ public class ListAuthorsArgs public int Offset { get; set; } public int Limit { get; set; } }; - public async Task> ListAuthors(ListAuthorsArgs args) + public async Task> ListAuthorsAsync(ListAuthorsArgs args) { if (this.Transaction == null) { @@ -164,7 +164,7 @@ public class CreateAuthorArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthor(CreateAuthorArgs args) + public async Task CreateAuthorAsync(CreateAuthorArgs args) { if (this.Transaction == null) { @@ -206,7 +206,7 @@ public class CreateAuthorReturnIdArgs public string Name { get; set; } public string Bio { get; set; } }; - public async Task CreateAuthorReturnId(CreateAuthorReturnIdArgs args) + public async Task CreateAuthorReturnIdAsync(CreateAuthorReturnIdArgs args) { if (this.Transaction == null) { @@ -248,7 +248,7 @@ public class GetAuthorByIdArgs { public int Id { get; set; } }; - public async Task GetAuthorById(GetAuthorByIdArgs args) + public async Task GetAuthorByIdAsync(GetAuthorByIdArgs args) { if (this.Transaction == null) { @@ -312,7 +312,7 @@ public class GetAuthorByIdWithMultipleNamedParamArgs public int IdArg { get; set; } public int? Take { get; set; } }; - public async Task GetAuthorByIdWithMultipleNamedParam(GetAuthorByIdWithMultipleNamedParamArgs args) + public async Task GetAuthorByIdWithMultipleNamedParamAsync(GetAuthorByIdWithMultipleNamedParamArgs args) { if (this.Transaction == null) { @@ -378,7 +378,7 @@ public class GetAuthorByNamePatternArgs { public string NamePattern { get; set; } }; - public async Task> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args) + public async Task> GetAuthorByNamePatternAsync(GetAuthorByNamePatternArgs args) { if (this.Transaction == null) { @@ -423,7 +423,7 @@ public class UpdateAuthorsArgs { public string Bio { get; set; } }; - public async Task UpdateAuthors(UpdateAuthorsArgs args) + public async Task UpdateAuthorsAsync(UpdateAuthorsArgs args) { if (this.Transaction == null) { @@ -460,7 +460,7 @@ public class GetAuthorsByIdsArgs { public int[] Ids { get; set; } }; - public async Task> GetAuthorsByIds(GetAuthorsByIdsArgs args) + public async Task> GetAuthorsByIdsAsync(GetAuthorsByIdsArgs args) { var transformedSql = GetAuthorsByIdsSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -514,7 +514,7 @@ public class GetAuthorsByIdsAndNamesArgs public int[] Ids { get; set; } public string[] Names { get; set; } }; - public async Task> GetAuthorsByIdsAndNames(GetAuthorsByIdsAndNamesArgs args) + public async Task> GetAuthorsByIdsAndNamesAsync(GetAuthorsByIdsAndNamesArgs args) { var transformedSql = GetAuthorsByIdsAndNamesSql; transformedSql = Utils.TransformQueryForSliceArgs(transformedSql, args.Ids.Length, "ids"); @@ -567,7 +567,7 @@ public class DeleteAuthorArgs { public string Name { get; set; } }; - public async Task DeleteAuthor(DeleteAuthorArgs args) + public async Task DeleteAuthorAsync(DeleteAuthorArgs args) { if (this.Transaction == null) { @@ -605,7 +605,7 @@ public class CreateBookArgs public string Name { get; set; } public int AuthorId { get; set; } }; - public async Task CreateBook(CreateBookArgs args) + public async Task CreateBookAsync(CreateBookArgs args) { if (this.Transaction == null) { @@ -645,7 +645,7 @@ public class ListAllAuthorsBooksRow public Author Author { get; set; } public Book Book { get; set; } }; - public async Task> ListAllAuthorsBooks() + public async Task> ListAllAuthorsBooksAsync() { if (this.Transaction == null) { @@ -692,7 +692,7 @@ public class GetDuplicateAuthorsRow public Author Author { get; set; } public Author Author2 { get; set; } }; - public async Task> GetDuplicateAuthors() + public async Task> GetDuplicateAuthorsAsync() { if (this.Transaction == null) { @@ -744,7 +744,7 @@ public class GetAuthorsByBookNameArgs { public string Name { get; set; } }; - public async Task> GetAuthorsByBookName(GetAuthorsByBookNameArgs args) + public async Task> GetAuthorsByBookNameAsync(GetAuthorsByBookNameArgs args) { if (this.Transaction == null) { @@ -783,7 +783,7 @@ public async Task> GetAuthorsByBookName(GetAuthors } private const string DeleteAllAuthorsSql = "DELETE FROM authors"; - public async Task DeleteAllAuthors() + public async Task DeleteAllAuthorsAsync() { if (this.Transaction == null) { @@ -836,7 +836,7 @@ public class InsertSqliteTypesArgs public bool? CTextBoolOverride { get; set; } public bool? CIntegerBoolOverride { get; set; } }; - public async Task InsertSqliteTypes(InsertSqliteTypesArgs args) + public async Task InsertSqliteTypesAsync(InsertSqliteTypesArgs args) { if (this.Transaction == null) { @@ -889,7 +889,7 @@ public class InsertSqliteTypesBatchArgs public decimal? CReal { get; set; } public string CText { get; set; } }; - public async Task InsertSqliteTypesBatch(List args) + public async Task InsertSqliteTypesBatchAsync(List args) { using (var connection = new SqliteConnection(ConnectionString)) { @@ -935,7 +935,7 @@ public class GetSqliteTypesRow public bool? CTextBoolOverride { get; set; } public bool? CIntegerBoolOverride { get; set; } }; - public async Task GetSqliteTypes() + public async Task GetSqliteTypesAsync() { if (this.Transaction == null) { @@ -1016,7 +1016,7 @@ public class GetSqliteTypesCntRow public byte[] CBlob { get; set; } public int Cnt { get; set; } }; - public async Task GetSqliteTypesCnt() + public async Task GetSqliteTypesCntAsync() { if (this.Transaction == null) { @@ -1081,7 +1081,7 @@ public class GetSqliteFunctionsRow public decimal? MaxReal { get; set; } public object MaxText { get; set; } }; - public async Task GetSqliteFunctions() + public async Task GetSqliteFunctionsAsync() { if (this.Transaction == null) { @@ -1132,7 +1132,7 @@ public async Task GetSqliteFunctions() } private const string DeleteAllSqliteTypesSql = "DELETE FROM types_sqlite"; - public async Task DeleteAllSqliteTypes() + public async Task DeleteAllSqliteTypesAsync() { if (this.Transaction == null) { diff --git a/examples/SqliteLegacyExample/request.json b/examples/SqliteLegacyExample/request.json index 5649bf25..a9050f55 100644 --- a/examples/SqliteLegacyExample/request.json +++ b/examples/SqliteLegacyExample/request.json @@ -1463,5 +1463,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiU3FsaXRlTGVnYWN5RXhhbXBsZUdlbiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6W3siY29sdW1uIjoiR2V0U3FsaXRlRnVuY3Rpb25zOm1heF9pbnRlZ2VyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImludCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRTcWxpdGVGdW5jdGlvbnM6bWF4X3ZhcmNoYXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFNxbGl0ZUZ1bmN0aW9uczptYXhfcmVhbCIsImNzaGFycF90eXBlIjp7InR5cGUiOiJkZWNpbWFsIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190ZXh0X2RhdGV0aW1lX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y19pbnRlZ2VyX2RhdGV0aW1lX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190ZXh0X2Jvb2xfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiYm9vbCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfaW50ZWdlcl9ib29sX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImJvb2wiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RleHRfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2ludGVnZXJfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19XSwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZX0=" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0c3RhbmRhcmQyLjAiLCJuYW1lc3BhY2VOYW1lIjoiU3FsaXRlTGVnYWN5RXhhbXBsZUdlbiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6W3siY29sdW1uIjoiR2V0U3FsaXRlRnVuY3Rpb25zOm1heF9pbnRlZ2VyIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImludCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiJHZXRTcWxpdGVGdW5jdGlvbnM6bWF4X3ZhcmNoYXIiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoic3RyaW5nIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6IkdldFNxbGl0ZUZ1bmN0aW9uczptYXhfcmVhbCIsImNzaGFycF90eXBlIjp7InR5cGUiOiJkZWNpbWFsIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190ZXh0X2RhdGV0aW1lX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y19pbnRlZ2VyX2RhdGV0aW1lX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6IkRhdGVUaW1lIiwibm90TnVsbCI6ZmFsc2V9fSx7ImNvbHVtbiI6Iio6Y190ZXh0X2Jvb2xfb3ZlcnJpZGUiLCJjc2hhcnBfdHlwZSI6eyJ0eXBlIjoiYm9vbCIsIm5vdE51bGwiOmZhbHNlfX0seyJjb2x1bW4iOiIqOmNfaW50ZWdlcl9ib29sX292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6ImJvb2wiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX3RleHRfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19LHsiY29sdW1uIjoiKjpjX2ludGVnZXJfbm9kYV9pbnN0YW50X292ZXJyaWRlIiwiY3NoYXJwX3R5cGUiOnsidHlwZSI6Ikluc3RhbnQiLCJub3ROdWxsIjpmYWxzZX19XSwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZSwid2l0aEFzeW5jU3VmZml4Ijp0cnVlfQ==" } \ No newline at end of file diff --git a/examples/SqliteLegacyExample/request.message b/examples/SqliteLegacyExample/request.message index efdd72410e1efd37b013ac250d7341c7613b2d65..8c1fae689286c27ee14f6dcec5ad2d3d22dba38b 100644 GIT binary patch delta 39 vcmdlUdMXx;=EmOf|+in`f!XurSsF06(w>O#lD@ diff --git a/global.json b/global.json index 7e8c0276..3d946171 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "8.0.404" + "version": "8.0.416" } } \ No newline at end of file diff --git a/unit-tests/CodegenTests/test-requests/DefaultSchemaEnum/request.json b/unit-tests/CodegenTests/test-requests/DefaultSchemaEnum/request.json index d9814aef..f6847054 100644 --- a/unit-tests/CodegenTests/test-requests/DefaultSchemaEnum/request.json +++ b/unit-tests/CodegenTests/test-requests/DefaultSchemaEnum/request.json @@ -101,5 +101,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6bnVsbCwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZX0=" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6bnVsbCwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZSwid2l0aEFzeW5jU3VmZml4Ijp0cnVlfQ==" } \ No newline at end of file diff --git a/unit-tests/CodegenTests/test-requests/DefaultSchemaEnum/request.message b/unit-tests/CodegenTests/test-requests/DefaultSchemaEnum/request.message index 1956bf68..478bacf6 100644 --- a/unit-tests/CodegenTests/test-requests/DefaultSchemaEnum/request.message +++ b/unit-tests/CodegenTests/test-requests/DefaultSchemaEnum/request.message @@ -10,4 +10,4 @@ dummy_column0R  dummy_tablebdummy_table_dummy_columnz dummy_column: query.sql· 1INSERT INTO dummy_table (dummy_column) VALUES (?) TestInsert:exec*UQ - dummy_column0Rpublic dummy_tablebdummy_table_dummy_columnz dummy_column: query.sqlB  dummy_table"v1.30.0*×{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"net8.0","namespaceName":"","useDapper":false,"overrideDapperVersion":"","overrides":null,"debugRequest":false,"useCentralPackageManagement":false} \ No newline at end of file + dummy_column0Rpublic dummy_tablebdummy_table_dummy_columnz dummy_column: query.sqlB  dummy_table"v1.30.0*î{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"net8.0","namespaceName":"","useDapper":false,"overrideDapperVersion":"","overrides":null,"debugRequest":false,"useCentralPackageManagement":false,"withAsyncSuffix":true} \ No newline at end of file diff --git a/unit-tests/CodegenTests/test-requests/SchemaScopedEnum/request.json b/unit-tests/CodegenTests/test-requests/SchemaScopedEnum/request.json index 65e55df5..9931a47b 100644 --- a/unit-tests/CodegenTests/test-requests/SchemaScopedEnum/request.json +++ b/unit-tests/CodegenTests/test-requests/SchemaScopedEnum/request.json @@ -81,5 +81,5 @@ } ], "sqlc_version": "v1.30.0", - "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6bnVsbCwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZX0=" + "plugin_options": "eyJvdmVycmlkZURyaXZlclZlcnNpb24iOiIiLCJnZW5lcmF0ZUNzcHJvaiI6dHJ1ZSwidGFyZ2V0RnJhbWV3b3JrIjoibmV0OC4wIiwibmFtZXNwYWNlTmFtZSI6IiIsInVzZURhcHBlciI6ZmFsc2UsIm92ZXJyaWRlRGFwcGVyVmVyc2lvbiI6IiIsIm92ZXJyaWRlcyI6bnVsbCwiZGVidWdSZXF1ZXN0IjpmYWxzZSwidXNlQ2VudHJhbFBhY2thZ2VNYW5hZ2VtZW50IjpmYWxzZSwid2l0aEFzeW5jU3VmZml4Ijp0cnVlfQ==" } \ No newline at end of file diff --git a/unit-tests/CodegenTests/test-requests/SchemaScopedEnum/request.message b/unit-tests/CodegenTests/test-requests/SchemaScopedEnum/request.message index 86577ac0..c08bdfff 100644 --- a/unit-tests/CodegenTests/test-requests/SchemaScopedEnum/request.message +++ b/unit-tests/CodegenTests/test-requests/SchemaScopedEnum/request.message @@ -7,4 +7,4 @@  dummy_schema dummy_tableI dummy_column0R dummy_schema dummy_tablebdummy_table_dummy_column« 9SELECT dummy_column FROM dummy_schema.dummy_table LIMIT 1Test:one"W - dummy_column0R dummy_schema dummy_tablebdummy_table_dummy_columnz dummy_column: query.sql"v1.30.0*×{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"net8.0","namespaceName":"","useDapper":false,"overrideDapperVersion":"","overrides":null,"debugRequest":false,"useCentralPackageManagement":false} \ No newline at end of file + dummy_column0R dummy_schema dummy_tablebdummy_table_dummy_columnz dummy_column: query.sql"v1.30.0*î{"overrideDriverVersion":"","generateCsproj":true,"targetFramework":"net8.0","namespaceName":"","useDapper":false,"overrideDapperVersion":"","overrides":null,"debugRequest":false,"useCentralPackageManagement":false,"withAsyncSuffix":true} \ No newline at end of file