mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 04:18:16 +08:00
- 增加 IN 参数扩展 where id in @ids;#560
This commit is contained in:
@ -64,6 +64,8 @@ namespace FreeSql.Tests.MySqlConnector
|
||||
var t4 = g.mysql.Ado.Query<(int, string, string)>("select * from song");
|
||||
|
||||
var t5 = g.mysql.Ado.Query<dynamic>("select * from song");
|
||||
|
||||
var t6 = g.mysql.Ado.Query<xxx>("select * from song where id in @ids", new { ids = new[] { 1, 2, 3 } });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -53,6 +53,8 @@ namespace FreeSql.Tests.Dameng
|
||||
var t4 = g.dameng.Ado.Query<(int, string, string)>("select * from \"TB_TOPIC\"");
|
||||
|
||||
var t5 = g.dameng.Ado.Query<dynamic>("select * from \"TB_TOPIC\"");
|
||||
|
||||
var t6 = g.dameng.Ado.Query<xxx>("select * from \"TB_TOPIC\" where \"ID\" in @ids", new { ids = new[] { 1, 2, 3 } });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -53,6 +53,8 @@ namespace FreeSql.Tests.Firebird
|
||||
var t4 = g.firebird.Ado.Query<(int, string, string)>("select * from \"TB_TOPIC22\"");
|
||||
|
||||
var t5 = g.firebird.Ado.Query<dynamic>("select * from \"TB_TOPIC22\"");
|
||||
|
||||
var t6 = g.firebird.Ado.Query<xxx>("select * from \"TB_TOPIC22\" where \"ID\" in @ids", new { ids = new[] { 1, 2, 3 } });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -48,6 +48,8 @@ namespace FreeSql.Tests.KingbaseES
|
||||
var t4 = g.kingbaseES.Ado.Query<(int, string, string)>("select * from \"TB_TOPIC\"");
|
||||
|
||||
var t5 = g.kingbaseES.Ado.Query<dynamic>("select * from \"TB_TOPIC\"");
|
||||
|
||||
var t6 = g.kingbaseES.Ado.Query<xxx>("select * from TB_TOPIC where id in @ids", new { ids = new[] { 1, 2, 3 } });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -59,6 +59,8 @@ namespace FreeSql.Tests.MsAccess
|
||||
var t4 = g.msaccess.Ado.Query<(int, string, string)>("select * from [song]");
|
||||
|
||||
var t5 = g.msaccess.Ado.Query<dynamic>("select * from [song]");
|
||||
|
||||
var t6 = g.msaccess.Ado.Query<xxx>("select * from song where id in @ids", new { ids = new[] { 1, 2, 3 } });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -52,6 +52,8 @@ namespace FreeSql.Tests.MySql
|
||||
var t4 = g.mysql.Ado.Query<(int, string, string)>("select * from song");
|
||||
|
||||
var t5 = g.mysql.Ado.Query<dynamic>("select * from song");
|
||||
|
||||
var t6 = g.mysql.Ado.Query<xxx>("select * from song where id in ?ids", new { ids = new[] { 1, 2, 3 } });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -53,6 +53,8 @@ namespace FreeSql.Tests.Oracle
|
||||
var t4 = g.oracle.Ado.Query<(int, string, string)>("select * from \"TB_TOPIC\"");
|
||||
|
||||
var t5 = g.oracle.Ado.Query<dynamic>("select * from \"TB_TOPIC\"");
|
||||
|
||||
var t6 = g.oracle.Ado.Query<xxx>("select * from TB_TOPIC where id in :ids", new { ids = new[] { 1, 2, 3 } });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -54,6 +54,8 @@ namespace FreeSql.Tests.PostgreSQL
|
||||
var t4 = g.pgsql.Ado.Query<(int, string, string)>("select * from xxx");
|
||||
|
||||
var t5 = g.pgsql.Ado.Query<dynamic>("select * from xxx");
|
||||
|
||||
var t6 = g.pgsql.Ado.Query<xxx>("select * from xxx where id in @ids", new { ids = new[] { "1", "2", "3" } });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -54,6 +54,8 @@ namespace FreeSql.Tests.ShenTong
|
||||
var t4 = g.shentong.Ado.Query<(int, string, string)>("select * from xxx");
|
||||
|
||||
var t5 = g.shentong.Ado.Query<dynamic>("select * from xxx");
|
||||
|
||||
var t6 = g.shentong.Ado.Query<xxx>("select * from xxx where id in @ids", new { ids = new[] { "1", "2", "3" } });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -95,6 +95,8 @@ namespace FreeSql.Tests.SqlServer
|
||||
|
||||
var t5 = g.sqlserver.Ado.Query<dynamic>("select * from xxx where Id = @Id",
|
||||
new Dictionary<string, object> { ["id"] = 1 });
|
||||
|
||||
var t6 = g.sqlserver.Ado.Query<xxx>("select * from xxx where id in @ids", new { ids = new[] { 1, 2, 3 } });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -59,6 +59,8 @@ namespace FreeSql.Tests.Sqlite
|
||||
var t4 = g.sqlite.Ado.Query<(int, string, string)>("select * from \"song\"");
|
||||
|
||||
var t5 = g.sqlite.Ado.Query<dynamic>("select * from \"song\"");
|
||||
|
||||
var t6 = g.sqlite.Ado.Query<xxx>("select * from song where id in @ids", new { ids = new[] { 1, 2, 3 } });
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
Reference in New Issue
Block a user