mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 18:52:50 +08:00
- 修复 表达式 Not 位运算符解析错误;#340
This commit is contained in:
parent
b9948f4508
commit
f4ffcfff7c
@ -306,6 +306,7 @@ namespace FreeSql.Tests.Dameng
|
||||
[Fact]
|
||||
public void CurdAllField()
|
||||
{
|
||||
g.dameng.Delete<TableAllType>().Where("1=1").ExecuteAffrows();
|
||||
var item2 = new TableAllType
|
||||
{
|
||||
Bool = true,
|
||||
|
@ -155,6 +155,10 @@ namespace FreeSql.Tests
|
||||
[Fact]
|
||||
public void Test03()
|
||||
{
|
||||
var tttrule = 8;
|
||||
var tttid = new long[] { 18, 19, 4017 };
|
||||
g.sqlserver.Update<Author123>().Set(it => it.SongId == (short)(it.SongId & ~tttrule)).Where(it => (it.SongId & tttrule) == tttrule && !tttid.Contains(it.Id)).ExecuteAffrows();
|
||||
|
||||
g.sqlite.Delete<Song123>().Where("1=1").ExecuteAffrows();
|
||||
g.sqlite.Delete<Author123>().Where("1=1").ExecuteAffrows();
|
||||
g.sqlite.Insert(new Song123(1)).ExecuteAffrows();
|
||||
|
@ -580,6 +580,7 @@ namespace FreeSql.Internal
|
||||
{
|
||||
case ExpressionType.Not:
|
||||
var notExp = (exp as UnaryExpression)?.Operand;
|
||||
if (notExp.Type.IsNumberType()) return $"~{ExpressionLambdaToSql(notExp, tsc)}"; //位操作
|
||||
if (notExp.NodeType == ExpressionType.MemberAccess)
|
||||
{
|
||||
var notBody = ExpressionLambdaToSql(notExp, tsc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user