From e09ed66d5bb555128369b90ea2e68b9f30e34285 Mon Sep 17 00:00:00 2001 From: "Jeremy D. Miller" Date: Wed, 24 Jul 2024 10:17:42 -0500 Subject: [PATCH] handling bool values in sql value formatting --- .../Tables/Partitioning/PartitionExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Weasel.Postgresql/Tables/Partitioning/PartitionExtensions.cs b/src/Weasel.Postgresql/Tables/Partitioning/PartitionExtensions.cs index b341bf6..3376018 100644 --- a/src/Weasel.Postgresql/Tables/Partitioning/PartitionExtensions.cs +++ b/src/Weasel.Postgresql/Tables/Partitioning/PartitionExtensions.cs @@ -25,6 +25,8 @@ public static string FormatSqlValue(this T value) { if (typeof(T).IsNumeric()) return value.ToString(); + if (value is bool b) return b.ToString().ToUpperInvariant(); + if (value is string v && v.StartsWith("'") && v.EndsWith("'")) return v; return $"'{value.ToString()}'";