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

@ -82,7 +82,12 @@ namespace Oqtane.Database.MySQL
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 ? "1" : "0"; // MySQL uses 1/0 for boolean values
}