mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 修复 MySql 字符串反斜杠无效的 bug;
This commit is contained in:
@ -270,7 +270,7 @@ namespace FreeSql.Tests.Odbc.Dameng
|
||||
SByteNullable = 99,
|
||||
Short = short.MaxValue,
|
||||
ShortNullable = short.MinValue,
|
||||
String = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>string",
|
||||
String = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>string'\\?!@#$%^&*()_+{}}{~?><<>",
|
||||
TimeSpan = TimeSpan.FromSeconds(999),
|
||||
TimeSpanNullable = TimeSpan.FromSeconds(60),
|
||||
UInt = uint.MaxValue,
|
||||
@ -287,6 +287,11 @@ namespace FreeSql.Tests.Odbc.Dameng
|
||||
|
||||
item2.Id = (int)insert.AppendData(item2).ExecuteIdentity();
|
||||
var newitem2 = select.Where(a => a.Id == item2.Id).ToOne();
|
||||
Assert.Equal(item2.String, newitem2.String);
|
||||
|
||||
item2.Id = (int)insert.NoneParameter().AppendData(item2).ExecuteIdentity();
|
||||
newitem2 = select.Where(a => a.Id == item2.Id).ToOne();
|
||||
Assert.Equal(item2.String, newitem2.String);
|
||||
|
||||
var items = select.ToList();
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ namespace FreeSql.Tests.Odbc.Default
|
||||
testFieldSByteNullable = sbyte.MinValue,
|
||||
testFieldShort = short.MaxValue,
|
||||
testFieldShortNullable = short.MinValue,
|
||||
testFieldString = "我是中国人string",
|
||||
testFieldString = "我是中国人string'\\?!@#$%^&*()_+{}}{~?><<>",
|
||||
testFieldUInt = uint.MaxValue,
|
||||
testFieldUIntNullable = uint.MinValue,
|
||||
testFieldULong = ulong.MaxValue,
|
||||
@ -116,6 +116,11 @@ namespace FreeSql.Tests.Odbc.Default
|
||||
|
||||
var item3 = insert.AppendData(item2).ExecuteIdentity();
|
||||
var newitem2 = select.Where(a => a.Id == item2.Id).ToOne();
|
||||
Assert.Equal(item2.testFieldString, newitem2.testFieldString);
|
||||
|
||||
item2.Id = (int)insert.NoneParameter().AppendData(item2).ExecuteIdentity();
|
||||
newitem2 = select.Where(a => a.Id == item2.Id).ToOne();
|
||||
Assert.Equal(item2.testFieldString, newitem2.testFieldString);
|
||||
|
||||
var items = select.ToList();
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ namespace FreeSql.Tests.Odbc.MySql
|
||||
testFieldSByteNullable = 99,
|
||||
testFieldShort = short.MaxValue,
|
||||
testFieldShortNullable = short.MinValue,
|
||||
testFieldString = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>string",
|
||||
testFieldString = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>string'\\?!@#$%^&*()_+{}}{~?><<>",
|
||||
testFieldTimeSpan = TimeSpan.FromSeconds(999),
|
||||
testFieldTimeSpanNullable = TimeSpan.FromSeconds(60),
|
||||
testFieldUInt = uint.MaxValue,
|
||||
@ -263,6 +263,11 @@ namespace FreeSql.Tests.Odbc.MySql
|
||||
|
||||
item2.Id = (int)insert.AppendData(item2).ExecuteIdentity();
|
||||
var newitem2 = select.Where(a => a.Id == item2.Id).ToOne();
|
||||
Assert.Equal(item2.testFieldString, newitem2.testFieldString);
|
||||
|
||||
item2.Id = (int)insert.NoneParameter().AppendData(item2).ExecuteIdentity();
|
||||
newitem2 = select.Where(a => a.Id == item2.Id).ToOne();
|
||||
Assert.Equal(item2.testFieldString, newitem2.testFieldString);
|
||||
|
||||
var items = select.ToList();
|
||||
}
|
||||
|
@ -270,7 +270,7 @@ namespace FreeSql.Tests.Odbc.Oracle
|
||||
SByteNullable = 99,
|
||||
Short = short.MaxValue,
|
||||
ShortNullable = short.MinValue,
|
||||
String = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>string",
|
||||
String = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>string'\\?!@#$%^&*()_+{}}{~?><<>",
|
||||
TimeSpan = TimeSpan.FromSeconds(999),
|
||||
TimeSpanNullable = TimeSpan.FromSeconds(60),
|
||||
UInt = uint.MaxValue,
|
||||
@ -287,6 +287,11 @@ namespace FreeSql.Tests.Odbc.Oracle
|
||||
|
||||
item2.Id = (int)insert.AppendData(item2).ExecuteIdentity();
|
||||
var newitem2 = select.Where(a => a.Id == item2.Id).ToOne();
|
||||
Assert.Equal(item2.String, newitem2.String);
|
||||
|
||||
item2.Id = (int)insert.NoneParameter().AppendData(item2).ExecuteIdentity();
|
||||
newitem2 = select.Where(a => a.Id == item2.Id).ToOne();
|
||||
Assert.Equal(item2.String, newitem2.String);
|
||||
|
||||
var items = select.ToList();
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ namespace FreeSql.Tests.Odbc.PostgreSQL
|
||||
testFieldSByteNullable = sbyte.MinValue,
|
||||
testFieldShort = short.MaxValue,
|
||||
testFieldShortNullable = short.MinValue,
|
||||
testFieldString = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>String",
|
||||
testFieldString = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>string'\\?!@#$%^&*()_+{}}{~?><<>",
|
||||
testFieldTimeSpan = TimeSpan.FromDays(1),
|
||||
testFieldTimeSpanNullable = TimeSpan.FromSeconds(90),
|
||||
testFieldUInt = uint.MaxValue,
|
||||
@ -200,6 +200,11 @@ namespace FreeSql.Tests.Odbc.PostgreSQL
|
||||
|
||||
var item3 = insert.AppendData(item2).ExecuteInserted().First();
|
||||
var newitem2 = select.Where(a => a.Id == item3.Id).ToOne();
|
||||
Assert.Equal(item2.testFieldString, newitem2.testFieldString);
|
||||
|
||||
item3 = insert.NoneParameter().AppendData(item2).ExecuteInserted().First();
|
||||
newitem2 = select.Where(a => a.Id == item3.Id).ToOne();
|
||||
Assert.Equal(item2.testFieldString, newitem2.testFieldString);
|
||||
|
||||
var items = select.ToList();
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ namespace FreeSql.Tests.Odbc.SqlServer
|
||||
testFieldSByteNullable = sbyte.MinValue,
|
||||
testFieldShort = short.MaxValue,
|
||||
testFieldShortNullable = short.MinValue,
|
||||
testFieldString = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>string",
|
||||
testFieldString = "<22><><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD><D0B9><EFBFBD>string'\\?!@#$%^&*()_+{}}{~?><<>",
|
||||
testFieldTimeSpan = TimeSpan.FromSeconds(999),
|
||||
testFieldTimeSpanNullable = TimeSpan.FromSeconds(30),
|
||||
testFieldUInt = uint.MaxValue,
|
||||
@ -197,7 +197,12 @@ namespace FreeSql.Tests.Odbc.SqlServer
|
||||
var sqlTestUpdate = g.sqlserver.Update<TableAllType>().SetSource(item3NP).NoneParameter().ToSql();
|
||||
|
||||
var item3 = insert.AppendData(item2).ExecuteInserted();
|
||||
var newitem2 = select.Where(a => a.Id == item2.Id).ToOne();
|
||||
var newitem2 = select.Where(a => a.Id == item3[0].Id).ToOne();
|
||||
Assert.Equal(item2.testFieldString, newitem2.testFieldString);
|
||||
|
||||
item3 = insert.NoneParameter().AppendData(item2).ExecuteInserted();
|
||||
newitem2 = select.Where(a => a.Id == item3[0].Id).ToOne();
|
||||
Assert.Equal(item2.testFieldString, newitem2.testFieldString);
|
||||
|
||||
var items = select.ToList();
|
||||
}
|
||||
|
Reference in New Issue
Block a user