Include support for DateTime values in RewriteValue method

This commit is contained in:
sbwalker
2025-08-13 15:12:58 -04:00
parent 9a57cae4bd
commit cf96a80ead
4 changed files with 24 additions and 4 deletions

View File

@ -94,7 +94,12 @@ namespace Oqtane.Database.PostgreSQL
public override string RewriteValue(object value)
{
if (value.GetType().Name == "Boolean")
var type = value.GetType().Name;
if (type == "DateTime")
{
return $"'{value}'";
}
if (type == "Boolean")
{
return (bool)value ? "true" : "false"; // PostgreSQL uses true/false for boolean values
}