mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 23:13:42 +08:00
Update SqlServer JsonArray
This commit is contained in:
parent
ce073df2a2
commit
df17a96a42
@ -20,6 +20,12 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
public partial class SqlServerMethod : DefaultDbMethod, IDbMethods
|
public partial class SqlServerMethod : DefaultDbMethod, IDbMethods
|
||||||
{
|
{
|
||||||
|
public override string JsonArrayLength(MethodCallExpressionModel model)
|
||||||
|
{
|
||||||
|
var parameter = model.Args[0];
|
||||||
|
return $" (SELECT COUNT(*) FROM OPENJSON({parameter.MemberName})) ";
|
||||||
|
}
|
||||||
|
|
||||||
public override string JsonIndex(MethodCallExpressionModel model)
|
public override string JsonIndex(MethodCallExpressionModel model)
|
||||||
{
|
{
|
||||||
var parameter = model.Args[0];
|
var parameter = model.Args[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user