-
-
Notifications
You must be signed in to change notification settings - Fork 39
Description
On fresh start of empty PostgreSql there is 3 null inside result. I would suggest to add also check for contain.
src/Delta/DeltaExtensions_Sql.cs
if (result is null)
{
return string.Empty;
}
Solution:
if (result is null)
{
return string.Empty;
}
if (result[0] is null)
{
return string.Empty;
}
Error:
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
System.NullReferenceException: Object reference not set to an instance of an object.
at Delta.DeltaExtensions.ExecuteTimestampQuery(DbCommand command, CancellationToken cancel) in //src/Delta/DeltaExtensions_Sql.cs:line 75
at Delta.DeltaExtensions.ExecuteCommand(DbConnection connection, DbTransaction transaction, Func3 execute, CancellationToken cancel) in /_/src/Delta/DeltaExtensions_Sql.cs:line 26 at Delta.DeltaExtensions.ExecuteCommand(DbConnection connection, DbTransaction transaction, Func3 execute, CancellationToken cancel) in //src/Delta/DeltaExtensions_Sql.cs:line 30
at Delta.DeltaExtensions.ExecuteCommand(DbConnection connection, DbTransaction transaction, Func3 execute, CancellationToken cancel) in /_/src/Delta/DeltaExtensions_Sql.cs:line 30 at Delta.DeltaExtensions.HandleRequest(HttpContext context, ILogger logger, Func2 suffix, Func2 getTimeStamp, Func2 shouldExecute, LogLevel level) in //src/Delta/DeltaExtensions_Shared.cs:line 82
at Delta.DeltaExtensions.<>c__DisplayClass0_0`1.<b__0>d.MoveNext() in //src/Delta.EF/DeltaExtensions_EFMiddleware.cs:line 12
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)