Update pgsql

This commit is contained in:
sunkaixuan 2023-02-26 12:44:19 +08:00
parent a22c69dac9
commit c5b00ab130

View File

@ -84,6 +84,10 @@ namespace SqlSugar
{
value = ((DateTime)it.Value).ToString("O");
}
else if (it.Value is DateTimeOffset)
{
return FormatDateTimeOffset(it.Value);
}
else if (it.IsArray&&it.Value!=null)
{
return FormatValue(it.Value,it.PropertyName,i,it);
@ -147,6 +151,10 @@ namespace SqlSugar
return Convert.ToInt64(value);
}
}
else if (type == UtilConstants.DateTimeOffsetType)
{
return FormatDateTimeOffset(value);
}
else if (type == UtilConstants.BoolType)
{
return value.ObjToBool() ? "1" : "0";
@ -161,6 +169,10 @@ namespace SqlSugar
}
}
}
public override string FormatDateTimeOffset(object value)
{
return "'" + ((DateTimeOffset)value).ToString("o") + "'";
}
}
}