mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-11-07 18:04:55 +08:00
Update where(tree)
This commit is contained in:
@@ -333,9 +333,14 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var con = ToConditionalCollections(it.Value as ConditionalTree,ref indexTree, parameters);
|
var tree = it.Value as ConditionalTree;
|
||||||
|
var con = ToConditionalCollections(tree, ref indexTree, parameters);
|
||||||
var sqlobj = ConditionalModelToSql(new List<IConditionalModel> { con }, index);
|
var sqlobj = ConditionalModelToSql(new List<IConditionalModel> { con }, index);
|
||||||
var sql = sqlobj.Key;
|
var sql = sqlobj.Key;
|
||||||
|
if (sql.StartsWith(" NULL "))
|
||||||
|
{
|
||||||
|
sql = Regex.Replace(sql,"^ NULL ", it.Key.ToString().ToUpper());
|
||||||
|
}
|
||||||
RepairReplicationParameters(ref sql, sqlobj.Value, indexTree);
|
RepairReplicationParameters(ref sql, sqlobj.Value, indexTree);
|
||||||
model = new ConditionalModel()
|
model = new ConditionalModel()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace SqlSugar
|
|||||||
public enum WhereType
|
public enum WhereType
|
||||||
{
|
{
|
||||||
And=0,
|
And=0,
|
||||||
Or=1
|
Or=1,
|
||||||
|
Null=-1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user