- 修复 Firebird 批量插入 varchar 追加空格的问题;#1923

This commit is contained in:
2881099
2024-11-13 21:27:56 +08:00
parent 59e61e76a1
commit 54d7679073
3 changed files with 48 additions and 20 deletions

View File

@@ -89,6 +89,7 @@ namespace FreeSql.Firebird
if (value == null) return "NULL";
if (type.IsNumberType()) return string.Format(CultureInfo.InvariantCulture, "{0}", value);
if (type == typeof(byte[])) return $"x'{CommonUtils.BytesSqlRaw(value as byte[])}'";
if (type == typeof(string) && (specialParamFlag == "c" || specialParamFlag == "cu")) return $"cast('{value.ToString().Replace("'", "''")}' as varchar({col.DbSize}))"; //#1923
return FormatSql("{0}", value, 1);
}
}