Add SqlFunc.JsonListObjectAny

Add SqlFunc.JsonArrayAny
This commit is contained in:
sunkaixuan
2022-12-01 00:54:05 +08:00
parent 407de9638d
commit e75d50ba5a
4 changed files with 24 additions and 0 deletions

View File

@@ -681,5 +681,13 @@ namespace SqlSugar
model.Args[0].MemberName = name;
return AggregateSum(model);
}
public virtual string JsonListObjectAny(MethodCallExpressionModel model)
{
throw new NotImplementedException("Current database no support");
}
public virtual string JsonArrayAny(MethodCallExpressionModel model)
{
throw new NotImplementedException("Current database no support");
}
}
}

View File

@@ -100,5 +100,7 @@ namespace SqlSugar
string JsonLike(MethodCallExpressionModel model);
string Collate(MethodCallExpressionModel model);
string AggregateSumNoNull(MethodCallExpressionModel model);
string JsonListObjectAny(MethodCallExpressionModel model);
string JsonArrayAny(MethodCallExpressionModel model);
}
}

View File

@@ -256,5 +256,15 @@ namespace SqlSugar
public static DateTime Oracle_ToDate(string date,string format) { throw new NotSupportedException("Can only be used in expressions"); }
public static string Oracle_ToChar(DateTime date, string format) { throw new NotSupportedException("Can only be used in expressions"); }
public static int SqlServer_DateDiff(string dateType,DateTime date1,DateTime date2) { throw new NotSupportedException("Can only be used in expressions"); }
public static void JsonListObjectAny(object jsonListObject, string fieldName, string value)
{
throw new NotSupportedException("Can only be used in expressions");
}
public static void JsonArrayAny(object jsonArray,string arrayValue)
{
throw new NotSupportedException("Can only be used in expressions");
}
}
}

View File

@@ -752,6 +752,10 @@ namespace SqlSugar
return this.Context.DbMehtods.Collate(model);
case "AggregateSumNoNull":
return this.Context.DbMehtods.AggregateSumNoNull(model);
case "JsonListObjectAny":
return this.Context.DbMehtods.JsonListObjectAny(model);
case "JsonArrayAny":
return this.Context.DbMehtods.JsonArrayAny(model);
default:
break;
}