From 6cadf3a8b414efd9f8c3dfa8513f3f3991330a8a Mon Sep 17 00:00:00 2001 From: ballistic-booger <43063897+ballistic-booger@users.noreply.github.com> Date: Tue, 9 Sep 2025 10:34:28 +1000 Subject: [PATCH 1/5] Proposed fix for not null enum type This drops the `.Value` call on non nullable enum types, which doesn't exist --- Drivers/NpgsqlDriver.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Drivers/NpgsqlDriver.cs b/Drivers/NpgsqlDriver.cs index 9061a906..f530147d 100644 --- a/Drivers/NpgsqlDriver.cs +++ b/Drivers/NpgsqlDriver.cs @@ -608,11 +608,10 @@ string AddRowsToCopyCommand() { return (el, notNull, isDapper) => { - var enumToStringStmt = $"{el}.Value.Stringify()"; var nullValue = isDapper ? "null" : "(object)DBNull.Value"; return notNull - ? enumToStringStmt - : $"{el} != null ? {enumToStringStmt} : {nullValue}"; + ? $"{el}.Stringify()" + : $"{el} != null ? {el}.Value.Stringify() : {nullValue}"; }; } @@ -664,4 +663,5 @@ protected override string EnumToModelName(Column column) var (schemaName, enumName) = GetEnumSchemaAndName(column); return $"{schemaName}.{enumName}".ToPascalCase(); } -} \ No newline at end of file + +} From 4fee978d1dbf4ed6d6950d6637345bc013f1148f Mon Sep 17 00:00:00 2001 From: ballistic-booger <43063897+ballistic-booger@users.noreply.github.com> Date: Tue, 9 Sep 2025 10:43:18 +1000 Subject: [PATCH 2/5] Remove unintended whitespace changes --- Drivers/NpgsqlDriver.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Drivers/NpgsqlDriver.cs b/Drivers/NpgsqlDriver.cs index f530147d..f27f27a5 100644 --- a/Drivers/NpgsqlDriver.cs +++ b/Drivers/NpgsqlDriver.cs @@ -663,5 +663,4 @@ protected override string EnumToModelName(Column column) var (schemaName, enumName) = GetEnumSchemaAndName(column); return $"{schemaName}.{enumName}".ToPascalCase(); } - } From 08558acf1202fa3faf2037811f4343f528985795 Mon Sep 17 00:00:00 2001 From: ballistic-booger <43063897+ballistic-booger@users.noreply.github.com> Date: Tue, 9 Sep 2025 10:44:49 +1000 Subject: [PATCH 3/5] Attempt 2 at fixing file line endings From d70fce29103d7cafa4fab0b91573f264c605a0a0 Mon Sep 17 00:00:00 2001 From: ballistic-booger <43063897+ballistic-booger@users.noreply.github.com> Date: Wed, 10 Sep 2025 06:26:52 +1000 Subject: [PATCH 4/5] add end of line to fix lint error on build --- Drivers/NpgsqlDriver.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Drivers/NpgsqlDriver.cs b/Drivers/NpgsqlDriver.cs index f27f27a5..1bfe6f02 100644 --- a/Drivers/NpgsqlDriver.cs +++ b/Drivers/NpgsqlDriver.cs @@ -664,3 +664,4 @@ protected override string EnumToModelName(Column column) return $"{schemaName}.{enumName}".ToPascalCase(); } } + From 4a2003185a8eced4a11cf82bfae6a3a83dc71ab3 Mon Sep 17 00:00:00 2001 From: Marco van Rooyen Date: Thu, 11 Sep 2025 06:34:00 +1000 Subject: [PATCH 5/5] ran dotnet format - use dotnet 8 --- Drivers/NpgsqlDriver.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Drivers/NpgsqlDriver.cs b/Drivers/NpgsqlDriver.cs index 1bfe6f02..409d7570 100644 --- a/Drivers/NpgsqlDriver.cs +++ b/Drivers/NpgsqlDriver.cs @@ -663,5 +663,4 @@ protected override string EnumToModelName(Column column) var (schemaName, enumName) = GetEnumSchemaAndName(column); return $"{schemaName}.{enumName}".ToPascalCase(); } -} - +} \ No newline at end of file