From 0e1076147c08b68a45873ecf2c2a1e235ed9ab19 Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Fri, 28 Oct 2022 15:28:24 -0700 Subject: [PATCH 01/30] upgrading sql client to 4.1.0 --- src/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 8fc38b73c5..cf0610cb5f 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -8,7 +8,7 @@ 12.8.2 3.20.0 - 3.0.0 + 4.1.0 6.0.0-preview.3.21201.4 5.0.10 7.9.0 From 2da481b314da6fd8c03ae53b3cb595e93276fb7e Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Fri, 28 Oct 2022 15:53:50 -0700 Subject: [PATCH 02/30] sql client 4.1 uses encryption by default, turning off --- ConfigGenerators/MsSqlCommands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConfigGenerators/MsSqlCommands.txt b/ConfigGenerators/MsSqlCommands.txt index b9101408b5..c089332ac6 100644 --- a/ConfigGenerators/MsSqlCommands.txt +++ b/ConfigGenerators/MsSqlCommands.txt @@ -1,4 +1,4 @@ -init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" +init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;Encrypt=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" add Publisher --config "dab-config.MsSql.json" --source publishers --permissions "anonymous:read" add Stock --config "dab-config.MsSql.json" --source stocks --permissions "anonymous:create,read,update" add Book --config "dab-config.MsSql.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books" From 30daaedebfbf49c2731adb5a000bea8e03af9d9e Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Fri, 28 Oct 2022 16:19:15 -0700 Subject: [PATCH 03/30] moving encrypt false' --- ConfigGenerators/MsSqlCommands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConfigGenerators/MsSqlCommands.txt b/ConfigGenerators/MsSqlCommands.txt index c089332ac6..4669d342b7 100644 --- a/ConfigGenerators/MsSqlCommands.txt +++ b/ConfigGenerators/MsSqlCommands.txt @@ -1,4 +1,4 @@ -init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;Encrypt=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" +init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;Encrypt=False;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" add Publisher --config "dab-config.MsSql.json" --source publishers --permissions "anonymous:read" add Stock --config "dab-config.MsSql.json" --source stocks --permissions "anonymous:create,read,update" add Book --config "dab-config.MsSql.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books" From 3a9c9a8c26f3a0300a6474562759f6219151278c Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Fri, 28 Oct 2022 16:26:19 -0700 Subject: [PATCH 04/30] removing encyrption=false --- ConfigGenerators/MsSqlCommands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConfigGenerators/MsSqlCommands.txt b/ConfigGenerators/MsSqlCommands.txt index 4669d342b7..e5b178c241 100644 --- a/ConfigGenerators/MsSqlCommands.txt +++ b/ConfigGenerators/MsSqlCommands.txt @@ -1,4 +1,4 @@ -init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;Encrypt=False;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" +init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" add Publisher --config "dab-config.MsSql.json" --source publishers --permissions "anonymous:read" add Stock --config "dab-config.MsSql.json" --source stocks --permissions "anonymous:create,read,update" add Book --config "dab-config.MsSql.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books" From 9aa7afd3158881ab881597eff4ce856de9e7f88c Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Fri, 28 Oct 2022 16:37:41 -0700 Subject: [PATCH 05/30] reverting MsSqlCommands.txt --- ConfigGenerators/MsSqlCommands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConfigGenerators/MsSqlCommands.txt b/ConfigGenerators/MsSqlCommands.txt index e5b178c241..a5bc5f9997 100644 --- a/ConfigGenerators/MsSqlCommands.txt +++ b/ConfigGenerators/MsSqlCommands.txt @@ -103,4 +103,4 @@ update Journal --config "dab-config.MsSql.json" --permissions "policy_tester_upd update Journal --config "dab-config.MsSql.json" --permissions "authorizationHandlerTester:read" update ArtOfWar --config "dab-config.MsSql.json" --permissions "authenticated:*" --map "DetailAssessmentAndPlanning:始計,WagingWar:作戰,StrategicAttack:謀攻,NoteNum:┬─┬ノ( º _ ºノ)" update GetBook --config "dab-config.MsSql.json" --permissions "authenticated:*" -update GetBooks --config "dab-config.MsSql.json" --permissions "authenticated:*" +update GetBooks --config "dab-config.MsSql.json" --permissions "authenticated:*" \ No newline at end of file From 7f7be9fab10610a852b966bee0a2bdf632c166be Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Fri, 28 Oct 2022 16:41:15 -0700 Subject: [PATCH 06/30] files still have diff --- ConfigGenerators/MsSqlCommands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConfigGenerators/MsSqlCommands.txt b/ConfigGenerators/MsSqlCommands.txt index a5bc5f9997..e5b178c241 100644 --- a/ConfigGenerators/MsSqlCommands.txt +++ b/ConfigGenerators/MsSqlCommands.txt @@ -103,4 +103,4 @@ update Journal --config "dab-config.MsSql.json" --permissions "policy_tester_upd update Journal --config "dab-config.MsSql.json" --permissions "authorizationHandlerTester:read" update ArtOfWar --config "dab-config.MsSql.json" --permissions "authenticated:*" --map "DetailAssessmentAndPlanning:始計,WagingWar:作戰,StrategicAttack:謀攻,NoteNum:┬─┬ノ( º _ ºノ)" update GetBook --config "dab-config.MsSql.json" --permissions "authenticated:*" -update GetBooks --config "dab-config.MsSql.json" --permissions "authenticated:*" \ No newline at end of file +update GetBooks --config "dab-config.MsSql.json" --permissions "authenticated:*" From a8740fd549e5047d072a0481c48cbd9bbef92e62 Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Fri, 28 Oct 2022 16:48:58 -0700 Subject: [PATCH 07/30] Revert "sql client 4.1 uses encryption by default, turning off" This reverts commit 2da481b314da6fd8c03ae53b3cb595e93276fb7e. --- ConfigGenerators/MsSqlCommands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConfigGenerators/MsSqlCommands.txt b/ConfigGenerators/MsSqlCommands.txt index e5b178c241..b9101408b5 100644 --- a/ConfigGenerators/MsSqlCommands.txt +++ b/ConfigGenerators/MsSqlCommands.txt @@ -1,4 +1,4 @@ -init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" +init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" add Publisher --config "dab-config.MsSql.json" --source publishers --permissions "anonymous:read" add Stock --config "dab-config.MsSql.json" --source stocks --permissions "anonymous:create,read,update" add Book --config "dab-config.MsSql.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books" From 2ab74e35218ab735512555825d6c2ea1388b9b8b Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Fri, 28 Oct 2022 17:22:01 -0700 Subject: [PATCH 08/30] updating to 4.1.1 --- src/Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index cf0610cb5f..5a1c71960a 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -8,7 +8,7 @@ 12.8.2 3.20.0 - 4.1.0 + 4.1.1 6.0.0-preview.3.21201.4 5.0.10 7.9.0 From fef6bcbeb0f08db507fa3bbcefd12063d74209da Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Sat, 29 Oct 2022 22:12:44 -0700 Subject: [PATCH 09/30] try to print DockSqlPass in pipeline --- .pipelines/mssql-pipelines.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.pipelines/mssql-pipelines.yml b/.pipelines/mssql-pipelines.yml index 2143d6d015..274389d11f 100644 --- a/.pipelines/mssql-pipelines.yml +++ b/.pipelines/mssql-pipelines.yml @@ -38,12 +38,16 @@ jobs: inputs: dockerVersion: 17.09.0-ce releaseType: stable + + - bash: | + env + displayname: Print env variables - bash: | docker run -d -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=$(DockerSQLpass)" -p 1433:1433 --name customerdb mcr.microsoft.com/mssql/server:2019-latest condition: eq( variables['Agent.OS'], 'Linux' ) displayName: Get and Start Ubuntu SQL Server Image Docker - + - task: DotNetCoreCLI@2 displayName: Build inputs: From 75766e899a2f42ebdea32548b7a799105a94dca5 Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Sat, 29 Oct 2022 22:23:50 -0700 Subject: [PATCH 10/30] trying to set dockersqlpass --- .pipelines/mssql-pipelines.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.pipelines/mssql-pipelines.yml b/.pipelines/mssql-pipelines.yml index 274389d11f..f9555844b1 100644 --- a/.pipelines/mssql-pipelines.yml +++ b/.pipelines/mssql-pipelines.yml @@ -38,16 +38,14 @@ jobs: inputs: dockerVersion: 17.09.0-ce releaseType: stable - - - bash: | - env - displayname: Print env variables - bash: | docker run -d -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=$(DockerSQLpass)" -p 1433:1433 --name customerdb mcr.microsoft.com/mssql/server:2019-latest condition: eq( variables['Agent.OS'], 'Linux' ) displayName: Get and Start Ubuntu SQL Server Image Docker - + env: + DockerSQLpass: foo + - task: DotNetCoreCLI@2 displayName: Build inputs: From e4adb69a6f7667db6cb32b8b8e6b3fc76bb82e95 Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Tue, 1 Nov 2022 18:19:31 -0700 Subject: [PATCH 11/30] fix orderby for null int types --- ConfigGenerators/MsSqlCommands.txt | 3 ++- ConfigGenerators/MySqlCommands.txt | 3 ++- ConfigGenerators/PostgreSqlCommands.txt | 3 ++- .../SqlTests/RestApiTests/Find/FindApiTestBase.cs | 15 +++++++++++++++ .../RestApiTests/Find/MsSqlFindApiTests.cs | 6 ++++++ .../RestApiTests/Find/MySqlFindApiTests.cs | 11 +++++++++++ .../RestApiTests/Find/PostgreSqlFindApiTests.cs | 10 ++++++++++ .../SqlTests/RestApiTests/RestApiTestBase.cs | 2 ++ src/Service/Resolvers/BaseSqlQueryBuilder.cs | 9 +++++++-- .../Sql Query Structures/SqlQueryStructure.cs | 5 +++-- src/Service/Resolvers/SqlPaginationUtil.cs | 3 ++- 11 files changed, 62 insertions(+), 8 deletions(-) diff --git a/ConfigGenerators/MsSqlCommands.txt b/ConfigGenerators/MsSqlCommands.txt index b9101408b5..41a507c4c9 100644 --- a/ConfigGenerators/MsSqlCommands.txt +++ b/ConfigGenerators/MsSqlCommands.txt @@ -1,4 +1,4 @@ -init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" +init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" add Publisher --config "dab-config.MsSql.json" --source publishers --permissions "anonymous:read" add Stock --config "dab-config.MsSql.json" --source stocks --permissions "anonymous:create,read,update" add Book --config "dab-config.MsSql.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books" @@ -23,6 +23,7 @@ add ArtOfWar --config "dab-config.MsSql.json" --source "aow" --rest true --permi add series --config "dab-config.MsSql.json" --source "series" --permissions "anonymous:*" add GetBooks --config "dab-config.MsSql.json" --source "get_books" --source.type "stored-procedure" --permissions "anonymous:read" --rest true --graphql false add GetBook --config "dab-config.MsSql.json" --source "get_book_by_id" --source.type "stored-procedure" --permissions "anonymous:read" --rest true --graphql false +add TypeTable --config "dab-config.MsSql.json" --source "type_table" --source.type "table" --permissions "anonymous:read" --rest true --graphql true update Publisher --config "dab-config.MsSql.json" --permissions "authenticated:create,read,update,delete" --rest true --graphql true --relationship books --target.entity Book --cardinality many update Publisher --config "dab-config.MsSql.json" --permissions "policy_tester_01:create,delete" update Publisher --config "dab-config.MsSql.json" --permissions "policy_tester_01:update" --fields.include "*" diff --git a/ConfigGenerators/MySqlCommands.txt b/ConfigGenerators/MySqlCommands.txt index d8c0012975..d86d967fdd 100644 --- a/ConfigGenerators/MySqlCommands.txt +++ b/ConfigGenerators/MySqlCommands.txt @@ -1,4 +1,4 @@ -init --config "dab-config.MySql.json" --database-type mysql --connection-string "server=localhost;database=datagatewaytest;Allow User Variables=true;uid=root;pwd=REPLACEME" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" +init --config "dab-config.MySql.json" --database-type mysql --connection-string "server=localhost;database=datagatewaytest;Allow User Variables=true;uid=root;pwd=REPLACEME" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" add Publisher --config "dab-config.MySql.json" --source publishers --permissions "anonymous:read" add Stock --config "dab-config.MySql.json" --source stocks --permissions "anonymous:create,read,update" add Book --config "dab-config.MySql.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books" @@ -21,6 +21,7 @@ add Notebook --config "dab-config.MySql.json" --source "notebooks" --permissions add Journal --config "dab-config.MySql.json" --source "journals" --rest true --graphql true --permissions "policy_tester_noupdate:create,delete" add ArtOfWar --config "dab-config.MySql.json" --source "aow" --rest true --permissions "anonymous:*" add series --config "dab-config.MySql.json" --source "series" --permissions "anonymous:*" +add TypeTable --config "dab-config.MySql.json" --source "type_table" --source.type "table" --permissions "anonymous:read" --rest true --graphql true update Publisher --config "dab-config.MySql.json" --permissions "authenticated:create,read,update,delete" --rest true --graphql true --relationship books --target.entity Book --cardinality many update Publisher --config "dab-config.MySql.json" --permissions "policy_tester_01:create,delete" update Publisher --config "dab-config.MySql.json" --permissions "policy_tester_01:update" --fields.include "*" diff --git a/ConfigGenerators/PostgreSqlCommands.txt b/ConfigGenerators/PostgreSqlCommands.txt index 08475bf737..329bc0ca79 100644 --- a/ConfigGenerators/PostgreSqlCommands.txt +++ b/ConfigGenerators/PostgreSqlCommands.txt @@ -1,4 +1,4 @@ -init --config "dab-config.PostgreSql.json" --database-type postgresql --connection-string "Host=localhost;Database=datagatewaytest;username=REPLACEME;password=REPLACEME" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" +init --config "dab-config.PostgreSql.json" --database-type postgresql --connection-string "Host=localhost;Database=datagatewaytest;username=REPLACEME;password=REPLACEME" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" add Publisher --config "dab-config.PostgreSql.json" --source publishers --permissions "anonymous:read" add Stock --config "dab-config.PostgreSql.json" --source stocks --permissions "anonymous:create,read,update" add Book --config "dab-config.PostgreSql.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books" @@ -18,6 +18,7 @@ add Notebook --config "dab-config.PostgreSql.json" --source "notebooks" --permis add Journal --config "dab-config.PostgreSql.json" --source "journals" --rest true --graphql true --permissions "policy_tester_noupdate:create,delete" add ArtOfWar --config "dab-config.PostgreSql.json" --source "aow" --rest true --permissions "anonymous:*" add series --config "dab-config.PostgreSql.json" --source "series" --permissions "anonymous:*" +add TypeTable --config "dab-config.PostgreSql.json" --source "type_table" --source.type "table" --permissions "anonymous:read" --rest true --graphql true update Publisher --config "dab-config.PostgreSql.json" --permissions "authenticated:create,read,update,delete" --rest true --graphql true --relationship books --target.entity Book --cardinality many update Publisher --config "dab-config.PostgreSql.json" --permissions "policy_tester_01:create,delete" update Publisher --config "dab-config.PostgreSql.json" --permissions "policy_tester_01:update" --fields.include "*" diff --git a/src/Service.Tests/SqlTests/RestApiTests/Find/FindApiTestBase.cs b/src/Service.Tests/SqlTests/RestApiTests/Find/FindApiTestBase.cs index 52fa3eb162..7727171488 100644 --- a/src/Service.Tests/SqlTests/RestApiTests/Find/FindApiTestBase.cs +++ b/src/Service.Tests/SqlTests/RestApiTests/Find/FindApiTestBase.cs @@ -525,6 +525,21 @@ await SetupAndRunRestApiTest( ); } + /// + /// Tests the REST Api for Find operation using sorting + /// with integer type and null values. + /// + [TestMethod] + public async Task FindTestWithIntTypeNullValuesOrderByAsc() + { + await SetupAndRunRestApiTest( + primaryKeyRoute: string.Empty, + queryString: "?$orderby=int_types", + entityNameOrPath: _integrationTypeEntity, + sqlQuery: GetQuery(nameof(FindTestWithIntTypeNullValuesOrderByAsc)) + ); + } + /// /// Tests the REST Api for Find operation for all records. /// order by title in ascending order. diff --git a/src/Service.Tests/SqlTests/RestApiTests/Find/MsSqlFindApiTests.cs b/src/Service.Tests/SqlTests/RestApiTests/Find/MsSqlFindApiTests.cs index f2d4c2c2b8..dfdb816cce 100644 --- a/src/Service.Tests/SqlTests/RestApiTests/Find/MsSqlFindApiTests.cs +++ b/src/Service.Tests/SqlTests/RestApiTests/Find/MsSqlFindApiTests.cs @@ -254,6 +254,12 @@ public class MsSqlFindApiTests : FindApiTestBase $"ORDER BY book_id asc, id asc " + $"FOR JSON PATH, INCLUDE_NULL_VALUES" }, + { + "FindTestWithIntTypeNullValuesOrderByAsc", + $"SELECT * FROM type_table " + + $"ORDER BY int_types asc, id asc " + + $"FOR JSON PATH, INCLUDE_NULL_VALUES" + }, { "FindTestWithQueryStringAllFieldsOrderByAsc", $"SELECT * FROM { _integrationTableName } " + diff --git a/src/Service.Tests/SqlTests/RestApiTests/Find/MySqlFindApiTests.cs b/src/Service.Tests/SqlTests/RestApiTests/Find/MySqlFindApiTests.cs index 1d56a294ee..396c5802f7 100644 --- a/src/Service.Tests/SqlTests/RestApiTests/Find/MySqlFindApiTests.cs +++ b/src/Service.Tests/SqlTests/RestApiTests/Find/MySqlFindApiTests.cs @@ -478,6 +478,17 @@ SELECT JSON_ARRAYAGG(JSON_OBJECT('id', id, 'content', content, 'book_id', book_i LIMIT 1 ) AS subq" }, + { + "FindTestWithIntTypeNullValuesOrderByAsc", + @" + SELECT JSON_ARRAYAGG(JSON_OBJECT('id', id, 'title', title, 'publisher_id', publisher_id)) AS data + FROM ( + SELECT * + FROM " + _integrationTypeTable + @" + ORDER BY int_types asc, id asc + LIMIT 100 + ) AS subq" + }, { "FindTestWithQueryStringAllFieldsOrderByAsc", @" diff --git a/src/Service.Tests/SqlTests/RestApiTests/Find/PostgreSqlFindApiTests.cs b/src/Service.Tests/SqlTests/RestApiTests/Find/PostgreSqlFindApiTests.cs index 34f0697d47..93e5f35401 100644 --- a/src/Service.Tests/SqlTests/RestApiTests/Find/PostgreSqlFindApiTests.cs +++ b/src/Service.Tests/SqlTests/RestApiTests/Find/PostgreSqlFindApiTests.cs @@ -371,6 +371,16 @@ LIMIT 1 ) AS subq " }, + { + "FindTestWithIntTypeNullValuesOrderByAsc", + @" + SELECT json_agg(to_jsonb(subq)) AS data + FROM ( + SELECT * + FROM " + _integrationTypeTable + @" + ORDER BY int_types asc, id asc + ) AS subq" + }, { "FindTestWithQueryStringAllFieldsOrderByAsc", @" diff --git a/src/Service.Tests/SqlTests/RestApiTests/RestApiTestBase.cs b/src/Service.Tests/SqlTests/RestApiTests/RestApiTestBase.cs index b180aebe58..6f8a5d9df1 100644 --- a/src/Service.Tests/SqlTests/RestApiTests/RestApiTestBase.cs +++ b/src/Service.Tests/SqlTests/RestApiTests/RestApiTestBase.cs @@ -42,6 +42,8 @@ public abstract class RestApiTestBase : SqlTestBase protected static readonly string _integrationProcedureFindOne_ProcName = "get_book_by_id"; protected static readonly string _integrationMappingDifferentEntityPath = "plants"; protected static readonly string _Composite_NonAutoGenPK_EntityPath = "commodities"; + protected static readonly string _integrationTypeEntity = "TypeTable"; + protected static readonly string _integrationTypeTable = "type_table"; public abstract string GetQuery(string key); } diff --git a/src/Service/Resolvers/BaseSqlQueryBuilder.cs b/src/Service/Resolvers/BaseSqlQueryBuilder.cs index cf1b567829..3eb87d9195 100644 --- a/src/Service/Resolvers/BaseSqlQueryBuilder.cs +++ b/src/Service/Resolvers/BaseSqlQueryBuilder.cs @@ -72,8 +72,13 @@ private string MakePaginationInequality(List columns, int unti StringBuilder result = new(); for (int i = 0; i <= untilIndex; i++) { - string op = i == untilIndex ? GetComparisonFromDirection(columns[i].Direction) : "="; - result.Append($"{Build(columns[i], printDirection: false)} {op} {columns[i].ParamName}"); + // Combine op and param to accomodate "is NULL" which is used for + // params that have value of NULL. + string opAndParam = i == untilIndex ? + $"{GetComparisonFromDirection(columns[i].Direction)} {columns[i].ParamName}" : + columns[i].Value is not null ? + $"= {columns[i].ParamName}" : "is NULL"; + result.Append($"{Build(columns[i], printDirection: false)} {opAndParam}"); if (i < untilIndex) { diff --git a/src/Service/Resolvers/Sql Query Structures/SqlQueryStructure.cs b/src/Service/Resolvers/Sql Query Structures/SqlQueryStructure.cs index adf02230bd..9b46bc5ed3 100644 --- a/src/Service/Resolvers/Sql Query Structures/SqlQueryStructure.cs +++ b/src/Service/Resolvers/Sql Query Structures/SqlQueryStructure.cs @@ -513,8 +513,9 @@ public void AddPaginationPredicate(IEnumerable afterJsonValues foreach (PaginationColumn column in afterJsonValues) { column.TableAlias = TableAlias; - column.ParamName = "@" + MakeParamWithValue( - GetParamAsColumnSystemType(column.Value!.ToString()!, column.ColumnName)); + column.ParamName = column.Value is not null ? + "@" + MakeParamWithValue(GetParamAsColumnSystemType(column.Value!.ToString()!, column.ColumnName)) : + "@" + MakeParamWithValue(null); } } catch (ArgumentException ex) diff --git a/src/Service/Resolvers/SqlPaginationUtil.cs b/src/Service/Resolvers/SqlPaginationUtil.cs index 2a6745c034..d597d3883b 100644 --- a/src/Service/Resolvers/SqlPaginationUtil.cs +++ b/src/Service/Resolvers/SqlPaginationUtil.cs @@ -374,10 +374,11 @@ private static string GetExposedColumnName(string entityName, string backingColu /// Resolves a JsonElement representing a variable to the appropriate type /// /// - public static object ResolveJsonElementToScalarVariable(JsonElement element) => element.ValueKind switch + public static object? ResolveJsonElementToScalarVariable(JsonElement element) => element.ValueKind switch { JsonValueKind.String => element.GetString()!, JsonValueKind.Number => element.GetInt64(), + JsonValueKind.Null => null, JsonValueKind.True => true, JsonValueKind.False => false, _ => throw new ArgumentException("Unexpected JsonElement value"), From f41869dbdc2f0a59c6c13f8fae33869d590cf8a5 Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Tue, 8 Nov 2022 20:38:22 -0800 Subject: [PATCH 12/30] print connection string --- src/Service/Startup.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Service/Startup.cs b/src/Service/Startup.cs index 9c3c4a4e11..6e8ed70b6a 100644 --- a/src/Service/Startup.cs +++ b/src/Service/Startup.cs @@ -256,6 +256,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, RuntimeC { // Config provided before starting the engine. isRuntimeReady = PerformOnConfigChangeAsync(app).Result; + Console.WriteLine($"{runtimeConfigProvider.GetRuntimeConfiguration().ConnectionString}"); if (_logger is not null && runtimeConfigProvider.RuntimeConfigPath is not null) { _logger.LogInformation($"Loading config file: {runtimeConfigProvider.RuntimeConfigPath!.ConfigFileName}"); From 240e134d3d79b285e73dc90f573946237347e147 Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Tue, 8 Nov 2022 20:42:42 -0800 Subject: [PATCH 13/30] remove docksqlpass --- .pipelines/mssql-pipelines.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.pipelines/mssql-pipelines.yml b/.pipelines/mssql-pipelines.yml index f9555844b1..2143d6d015 100644 --- a/.pipelines/mssql-pipelines.yml +++ b/.pipelines/mssql-pipelines.yml @@ -43,8 +43,6 @@ jobs: docker run -d -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=$(DockerSQLpass)" -p 1433:1433 --name customerdb mcr.microsoft.com/mssql/server:2019-latest condition: eq( variables['Agent.OS'], 'Linux' ) displayName: Get and Start Ubuntu SQL Server Image Docker - env: - DockerSQLpass: foo - task: DotNetCoreCLI@2 displayName: Build From 628fb92355a83a0594f78efeb548f6346883241b Mon Sep 17 00:00:00 2001 From: aaronburtle <93220300+aaronburtle@users.noreply.github.com> Date: Tue, 8 Nov 2022 21:12:51 -0800 Subject: [PATCH 14/30] Update Startup.cs --- src/Service/Startup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/Startup.cs b/src/Service/Startup.cs index 42a8cfd3bb..cc29b6fa19 100644 --- a/src/Service/Startup.cs +++ b/src/Service/Startup.cs @@ -256,7 +256,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, RuntimeC { // Config provided before starting the engine. isRuntimeReady = PerformOnConfigChangeAsync(app).Result; - Console.WriteLine($"{runtimeConfigProvider.GetRuntimeConfiguration().ConnectionString}"); + // Console.WriteLine($"{runtimeConfigProvider.GetRuntimeConfiguration().ConnectionString}"); if (_logger is not null && runtimeConfigProvider.RuntimeConfigPath is not null) { _logger.LogInformation($"Loading config file: {runtimeConfigProvider.RuntimeConfigPath!.ConfigFileName}"); From ac71b05590a7cd90b93aba41a90be26009bc4eec Mon Sep 17 00:00:00 2001 From: aaronburtle <93220300+aaronburtle@users.noreply.github.com> Date: Tue, 8 Nov 2022 21:22:00 -0800 Subject: [PATCH 15/30] Update MsSqlCommands.txt --- ConfigGenerators/MsSqlCommands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConfigGenerators/MsSqlCommands.txt b/ConfigGenerators/MsSqlCommands.txt index cef9f34553..86f11f6fb4 100644 --- a/ConfigGenerators/MsSqlCommands.txt +++ b/ConfigGenerators/MsSqlCommands.txt @@ -1,4 +1,4 @@ -init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" +init --config "dab-config.MsSql.json" --database-type mssql --connection-string "Server=tcp:127.0.0.1,1433;Persist Security Info=False;User ID=sa;Password=REPLACEME;MultipleActiveResultSets=False;Connection Timeout=5;" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" add Publisher --config "dab-config.MsSql.json" --source publishers --permissions "anonymous:read" add Stock --config "dab-config.MsSql.json" --source stocks --permissions "anonymous:create,read,update" add Book --config "dab-config.MsSql.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books" From c172370c571f2a136bf621d22750f2e8deffc15e Mon Sep 17 00:00:00 2001 From: aaronburtle <93220300+aaronburtle@users.noreply.github.com> Date: Tue, 8 Nov 2022 21:22:51 -0800 Subject: [PATCH 16/30] Update MySqlCommands.txt --- ConfigGenerators/MySqlCommands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConfigGenerators/MySqlCommands.txt b/ConfigGenerators/MySqlCommands.txt index a7dc760739..ac8f5eca7a 100644 --- a/ConfigGenerators/MySqlCommands.txt +++ b/ConfigGenerators/MySqlCommands.txt @@ -1,4 +1,4 @@ -init --config "dab-config.MySql.json" --database-type mysql --connection-string "server=localhost;database=datagatewaytest;Allow User Variables=true;uid=root;pwd=REPLACEME" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" +init --config "dab-config.MySql.json" --database-type mysql --connection-string "server=localhost;database=datagatewaytest;Allow User Variables=true;uid=root;pwd=REPLACEME" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" add Publisher --config "dab-config.MySql.json" --source publishers --permissions "anonymous:read" add Stock --config "dab-config.MySql.json" --source stocks --permissions "anonymous:create,read,update" add Book --config "dab-config.MySql.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books" From 473a49d8697c4b97ff5cb3ea8acc7771e4333e42 Mon Sep 17 00:00:00 2001 From: aaronburtle <93220300+aaronburtle@users.noreply.github.com> Date: Tue, 8 Nov 2022 21:23:30 -0800 Subject: [PATCH 17/30] Update MsSqlCommands.txt --- ConfigGenerators/MsSqlCommands.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/ConfigGenerators/MsSqlCommands.txt b/ConfigGenerators/MsSqlCommands.txt index 86f11f6fb4..f2882bb2ac 100644 --- a/ConfigGenerators/MsSqlCommands.txt +++ b/ConfigGenerators/MsSqlCommands.txt @@ -25,7 +25,6 @@ add ArtOfWar --config "dab-config.MsSql.json" --source "aow" --rest true --permi add series --config "dab-config.MsSql.json" --source "series" --permissions "anonymous:*" add GetBooks --config "dab-config.MsSql.json" --source "get_books" --source.type "stored-procedure" --permissions "anonymous:read" --rest true --graphql false add GetBook --config "dab-config.MsSql.json" --source "get_book_by_id" --source.type "stored-procedure" --permissions "anonymous:read" --rest true --graphql false -add TypeTable --config "dab-config.MsSql.json" --source "type_table" --source.type "table" --permissions "anonymous:read" --rest true --graphql true update Publisher --config "dab-config.MsSql.json" --permissions "authenticated:create,read,update,delete" --rest true --graphql true --relationship books --target.entity Book --cardinality many update Publisher --config "dab-config.MsSql.json" --permissions "policy_tester_01:create,delete" update Publisher --config "dab-config.MsSql.json" --permissions "policy_tester_01:update" --fields.include "*" From f59ab00aa6ed0ac20da9d45ef9c6459b7ded419c Mon Sep 17 00:00:00 2001 From: aaronburtle <93220300+aaronburtle@users.noreply.github.com> Date: Tue, 8 Nov 2022 21:23:51 -0800 Subject: [PATCH 18/30] Update MySqlCommands.txt --- ConfigGenerators/MySqlCommands.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/ConfigGenerators/MySqlCommands.txt b/ConfigGenerators/MySqlCommands.txt index ac8f5eca7a..02582ec25f 100644 --- a/ConfigGenerators/MySqlCommands.txt +++ b/ConfigGenerators/MySqlCommands.txt @@ -23,7 +23,6 @@ add Notebook --config "dab-config.MySql.json" --source "notebooks" --permissions add Journal --config "dab-config.MySql.json" --source "journals" --rest true --graphql true --permissions "policy_tester_noupdate:create,delete" add ArtOfWar --config "dab-config.MySql.json" --source "aow" --rest true --permissions "anonymous:*" add series --config "dab-config.MySql.json" --source "series" --permissions "anonymous:*" -add TypeTable --config "dab-config.MySql.json" --source "type_table" --source.type "table" --permissions "anonymous:read" --rest true --graphql true update Publisher --config "dab-config.MySql.json" --permissions "authenticated:create,read,update,delete" --rest true --graphql true --relationship books --target.entity Book --cardinality many update Publisher --config "dab-config.MySql.json" --permissions "policy_tester_01:create,delete" update Publisher --config "dab-config.MySql.json" --permissions "policy_tester_01:update" --fields.include "*" From 3e51ebf08ac0038032871a3ae90524a9332c710e Mon Sep 17 00:00:00 2001 From: aaronburtle <93220300+aaronburtle@users.noreply.github.com> Date: Tue, 8 Nov 2022 21:24:05 -0800 Subject: [PATCH 19/30] Update PostgreSqlCommands.txt --- ConfigGenerators/PostgreSqlCommands.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ConfigGenerators/PostgreSqlCommands.txt b/ConfigGenerators/PostgreSqlCommands.txt index 0878bf17fa..dc1d01367a 100644 --- a/ConfigGenerators/PostgreSqlCommands.txt +++ b/ConfigGenerators/PostgreSqlCommands.txt @@ -1,4 +1,4 @@ -init --config "dab-config.PostgreSql.json" --database-type postgresql --connection-string "Host=localhost;Database=datagatewaytest;username=REPLACEME;password=REPLACEME" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" +init --config "dab-config.PostgreSql.json" --database-type postgresql --connection-string "Host=localhost;Database=datagatewaytest;username=REPLACEME;password=REPLACEME" --host-mode Development --authenticate-devmode-requests false --cors-origin "http://localhost:5000" add Publisher --config "dab-config.PostgreSql.json" --source publishers --permissions "anonymous:read" add Stock --config "dab-config.PostgreSql.json" --source stocks --permissions "anonymous:create,read,update" add Book --config "dab-config.PostgreSql.json" --source books --permissions "anonymous:create,read,update,delete" --graphql "book:books" @@ -23,7 +23,6 @@ add Notebook --config "dab-config.PostgreSql.json" --source "notebooks" --permis add Journal --config "dab-config.PostgreSql.json" --source "journals" --rest true --graphql true --permissions "policy_tester_noupdate:create,delete" add ArtOfWar --config "dab-config.PostgreSql.json" --source "aow" --rest true --permissions "anonymous:*" add series --config "dab-config.PostgreSql.json" --source "series" --permissions "anonymous:*" -add TypeTable --config "dab-config.PostgreSql.json" --source "type_table" --source.type "table" --permissions "anonymous:read" --rest true --graphql true update Publisher --config "dab-config.PostgreSql.json" --permissions "authenticated:create,read,update,delete" --rest true --graphql true --relationship books --target.entity Book --cardinality many update Publisher --config "dab-config.PostgreSql.json" --permissions "policy_tester_01:create,delete" update Publisher --config "dab-config.PostgreSql.json" --permissions "policy_tester_01:update" --fields.include "*" From f254c2e36403970d176a6bc66b05d162a5c0815c Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Wed, 9 Nov 2022 15:53:18 -0800 Subject: [PATCH 20/30] sql version to 5.0 --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 69aaba2d61..dc31a1370c 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -17,7 +17,7 @@ - + From db44f48bd747bc847235d12293ce64b170c2dd97 Mon Sep 17 00:00:00 2001 From: aaronburtle <93220300+aaronburtle@users.noreply.github.com> Date: Wed, 9 Nov 2022 15:58:01 -0800 Subject: [PATCH 21/30] Update Startup.cs --- src/Service/Startup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/Startup.cs b/src/Service/Startup.cs index cc29b6fa19..42a8cfd3bb 100644 --- a/src/Service/Startup.cs +++ b/src/Service/Startup.cs @@ -256,7 +256,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, RuntimeC { // Config provided before starting the engine. isRuntimeReady = PerformOnConfigChangeAsync(app).Result; - // Console.WriteLine($"{runtimeConfigProvider.GetRuntimeConfiguration().ConnectionString}"); + Console.WriteLine($"{runtimeConfigProvider.GetRuntimeConfiguration().ConnectionString}"); if (_logger is not null && runtimeConfigProvider.RuntimeConfigPath is not null) { _logger.LogInformation($"Loading config file: {runtimeConfigProvider.RuntimeConfigPath!.ConfigFileName}"); From ec61d910fe189f917ed12031f271e61ea9e1c855 Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Wed, 9 Nov 2022 16:16:33 -0800 Subject: [PATCH 22/30] version to 5.1.1 --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index dc31a1370c..34b54f4177 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -17,7 +17,7 @@ - + From 31fb75062739848e9a752047d44d279ff4cd4d30 Mon Sep 17 00:00:00 2001 From: aaronburtle <93220300+aaronburtle@users.noreply.github.com> Date: Wed, 9 Nov 2022 16:21:51 -0800 Subject: [PATCH 23/30] Update Directory.Packages.props --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 34b54f4177..69aaba2d61 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -17,7 +17,7 @@ - + From a2a3b8864cfb7dfa7a3bba5ff65b6ef89678123c Mon Sep 17 00:00:00 2001 From: aaronburtle <93220300+aaronburtle@users.noreply.github.com> Date: Wed, 9 Nov 2022 16:37:54 -0800 Subject: [PATCH 24/30] Update Startup.cs --- src/Service/Startup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/Startup.cs b/src/Service/Startup.cs index 42a8cfd3bb..2ac7efa1e4 100644 --- a/src/Service/Startup.cs +++ b/src/Service/Startup.cs @@ -256,7 +256,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, RuntimeC { // Config provided before starting the engine. isRuntimeReady = PerformOnConfigChangeAsync(app).Result; - Console.WriteLine($"{runtimeConfigProvider.GetRuntimeConfiguration().ConnectionString}"); + Console.WriteLine($"CONNECTION STRING = {runtimeConfigProvider.GetRuntimeConfiguration().ConnectionString}"); if (_logger is not null && runtimeConfigProvider.RuntimeConfigPath is not null) { _logger.LogInformation($"Loading config file: {runtimeConfigProvider.RuntimeConfigPath!.ConfigFileName}"); From 1ff33b86f064b01188aca37a345a142b2c20a896 Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Wed, 9 Nov 2022 20:10:29 -0800 Subject: [PATCH 25/30] print connection string --- src/Directory.Packages.props | 2 +- src/Service/Configurations/RuntimeConfigProvider.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 34b54f4177..69aaba2d61 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -17,7 +17,7 @@ - + diff --git a/src/Service/Configurations/RuntimeConfigProvider.cs b/src/Service/Configurations/RuntimeConfigProvider.cs index 0a71a19b5f..9cc9f75106 100644 --- a/src/Service/Configurations/RuntimeConfigProvider.cs +++ b/src/Service/Configurations/RuntimeConfigProvider.cs @@ -155,6 +155,7 @@ public static bool LoadRuntimeConfigValue( } } + Console.WriteLine($"CONNECTION STRING = {runtimeConfig.ConnectionString}"); return true; } From 6e23805667583810bded1c96603526b271e50ce8 Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Wed, 9 Nov 2022 20:43:35 -0800 Subject: [PATCH 26/30] print connection string --- src/Cli/src/Program.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Cli/src/Program.cs b/src/Cli/src/Program.cs index 1e2c6b8fdd..7725e86347 100644 --- a/src/Cli/src/Program.cs +++ b/src/Cli/src/Program.cs @@ -1,3 +1,4 @@ +using System.Runtime.CompilerServices; using CommandLine; using static Cli.Utils; @@ -27,6 +28,7 @@ public static int Main(string[] args) bool isSuccess = ConfigGenerator.TryGenerateConfig(options); if (isSuccess) { + Console.WriteLine($"CONNECTION STRING = {options.ConnectionString}"); Console.WriteLine($"Config file generated."); Console.WriteLine($"SUGGESTION: Use 'dab add ' to add new entities in your config."); } @@ -72,7 +74,7 @@ public static int Main(string[] args) Console.Error.WriteLine("Failed to start the engine."); } }); - + return result is Parsed ? 0 : -1; } } From 6791d6adbc469719335c30cb1900df5e69822c8e Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Thu, 8 Dec 2022 22:47:59 -0800 Subject: [PATCH 27/30] 4.0.1 --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 4b374d736e..3177ad331a 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -17,7 +17,7 @@ - + From 9acd004886bc5c664b1d9bf6621141399e50e663 Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Thu, 8 Dec 2022 22:49:09 -0800 Subject: [PATCH 28/30] 4.1.1 --- src/Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index 3177ad331a..d4ec00ca95 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -17,7 +17,7 @@ - + From 887b04afd5e163081e399e8ece164a7674e6712c Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Thu, 8 Dec 2022 22:57:43 -0800 Subject: [PATCH 29/30] formatting, removed some console printing --- src/Cli/src/Program.cs | 4 +--- src/Service/Configurations/RuntimeConfigProvider.cs | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Cli/src/Program.cs b/src/Cli/src/Program.cs index 7725e86347..1e2c6b8fdd 100644 --- a/src/Cli/src/Program.cs +++ b/src/Cli/src/Program.cs @@ -1,4 +1,3 @@ -using System.Runtime.CompilerServices; using CommandLine; using static Cli.Utils; @@ -28,7 +27,6 @@ public static int Main(string[] args) bool isSuccess = ConfigGenerator.TryGenerateConfig(options); if (isSuccess) { - Console.WriteLine($"CONNECTION STRING = {options.ConnectionString}"); Console.WriteLine($"Config file generated."); Console.WriteLine($"SUGGESTION: Use 'dab add ' to add new entities in your config."); } @@ -74,7 +72,7 @@ public static int Main(string[] args) Console.Error.WriteLine("Failed to start the engine."); } }); - + return result is Parsed ? 0 : -1; } } diff --git a/src/Service/Configurations/RuntimeConfigProvider.cs b/src/Service/Configurations/RuntimeConfigProvider.cs index 62bf624615..d95b0a7fef 100644 --- a/src/Service/Configurations/RuntimeConfigProvider.cs +++ b/src/Service/Configurations/RuntimeConfigProvider.cs @@ -155,7 +155,6 @@ public static bool LoadRuntimeConfigValue( } } - Console.WriteLine($"CONNECTION STRING = {runtimeConfig.ConnectionString}"); return true; } From e7d4a456bde962ce3ef4704bccfd9b861e89a9df Mon Sep 17 00:00:00 2001 From: aaron burtle Date: Thu, 8 Dec 2022 22:59:09 -0800 Subject: [PATCH 30/30] removed console print --- src/Service/Startup.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Service/Startup.cs b/src/Service/Startup.cs index 900c1ee960..deccc3b56b 100644 --- a/src/Service/Startup.cs +++ b/src/Service/Startup.cs @@ -257,7 +257,6 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, RuntimeC { // Config provided before starting the engine. isRuntimeReady = PerformOnConfigChangeAsync(app).Result; - Console.WriteLine($"CONNECTION STRING = {runtimeConfigProvider.GetRuntimeConfiguration().ConnectionString}"); if (_logger is not null && runtimeConfigProvider.RuntimeConfigPath is not null) { _logger.LogInformation($"Loading config file: {runtimeConfigProvider.RuntimeConfigPath!.ConfigFileName}");