mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Add SqlFunc.Coalesce
This commit is contained in:
parent
30f2ac67cd
commit
8a3307a11f
@ -1200,7 +1200,12 @@ namespace SqlSugar
|
||||
{
|
||||
return $" uuid_generate_v4() ";
|
||||
}
|
||||
|
||||
public virtual string Coalesce(MethodCallExpressionModel mode)
|
||||
{
|
||||
var parameterNameA = mode.Args[0].MemberName;
|
||||
var parameterNameB = mode.Args[1].MemberName;
|
||||
return $" COALESCE({parameterNameA},{parameterNameB}) ";
|
||||
}
|
||||
public virtual string FullTextContains(MethodCallExpressionModel mode)
|
||||
{
|
||||
var columns = mode.Args[0].MemberName;
|
||||
|
@ -130,5 +130,6 @@ namespace SqlSugar
|
||||
string FullTextContains(MethodCallExpressionModel mode);
|
||||
string PgsqlArrayContains(MethodCallExpressionModel model);
|
||||
string SelectFields(MethodCallExpressionModel model);
|
||||
string Coalesce(MethodCallExpressionModel model);
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,11 @@ namespace SqlSugar
|
||||
{
|
||||
public partial class SqlFunc
|
||||
{
|
||||
|
||||
public static T Coalesce<T>(T value1, T value2)
|
||||
{
|
||||
throw new NotSupportedException("Can only be used in expressions");
|
||||
}
|
||||
public static bool FullTextContains(string [] columnNames, string keyword)
|
||||
{
|
||||
throw new NotSupportedException("Can only be used in expressions");
|
||||
|
@ -2,7 +2,7 @@
|
||||
<package >
|
||||
<metadata>
|
||||
<id>SqlSugarCore</id>
|
||||
<version>5.1.4.176-preview08</version>
|
||||
<version>5.1.4.176-preview15</version>
|
||||
<authors>sunkaixuan</authors>
|
||||
<owners>果糖大数据科技</owners>
|
||||
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
||||
|
Loading…
Reference in New Issue
Block a user