mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 17:48:11 +08:00
Update exp to sql
This commit is contained in:
@@ -405,7 +405,9 @@ namespace OrmTest.Demo
|
||||
var test18 = db.Queryable<Student>().Where(it => it.SchoolId.HasValue&&it.SchoolId.HasValue).ToList();
|
||||
var test19 = db.Queryable<Student>().Where(it => it.SchoolId.HasValue && it.SchoolId.HasValue&&it.SchoolId.HasValue).ToList();
|
||||
var test20 = db.Queryable<Student>().Where(it => it.SchoolId.HasValue && SqlFunc.IsNullOrEmpty(it.Name)).ToList();
|
||||
//var test24 = db.Queryable<Student>().Where(it => !it.SchoolId.HasValue && it.SchoolId.HasValue).ToList();
|
||||
var test21 = db.Queryable<Student>().Where(it => !it.SchoolId.HasValue && it.Name == "").ToList();
|
||||
var test22 = db.Queryable<Student>().Where(it => !it.SchoolId.HasValue && it.SchoolId.HasValue).ToList();
|
||||
var test24 = db.Queryable<Student>().Where(it => !(it.Id==1) && it.Name=="").ToList();
|
||||
}
|
||||
public static void Page()
|
||||
{
|
||||
|
@@ -49,6 +49,10 @@ namespace SqlSugar
|
||||
base.Expression = leftExpression;
|
||||
base.IsLeft = true;
|
||||
base.Start();
|
||||
if (leftExpression is UnaryExpression && leftExpression.Type == UtilConstants.BoolType&&!this.Context.Result.Contains(ExpressionConst.ExpressionReplace))
|
||||
{
|
||||
this.Context.Result.AppendFormat(" {0} ", ExpressionTool.GetOperator(expression.NodeType));
|
||||
}
|
||||
base.IsLeft = false;
|
||||
base.Expression = rightExpression;
|
||||
base.Start();
|
||||
|
Reference in New Issue
Block a user