mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-06 21:58:02 +08:00
Update SqlFunc.CharIndex pgsql
This commit is contained in:
parent
caf9f68099
commit
38aa7174f1
@ -104,6 +104,10 @@ namespace SqlSugar
|
||||
}
|
||||
public class KdbndpMethod : DefaultDbMethod, IDbMethods
|
||||
{
|
||||
public override string CharIndex(MethodCallExpressionModel model)
|
||||
{
|
||||
return string.Format(" (strpos ({1},{0})-1)", model.Args[0].MemberName, model.Args[1].MemberName);
|
||||
}
|
||||
public override string TrueValue()
|
||||
{
|
||||
return "true";
|
||||
|
@ -98,6 +98,10 @@ namespace SqlSugar
|
||||
}
|
||||
public class OscarLMethod : DefaultDbMethod, IDbMethods
|
||||
{
|
||||
public override string CharIndex(MethodCallExpressionModel model)
|
||||
{
|
||||
return string.Format(" (strpos ({1},{0})-1)", model.Args[0].MemberName, model.Args[1].MemberName);
|
||||
}
|
||||
public override string IIF(MethodCallExpressionModel model)
|
||||
{
|
||||
var parameter = model.Args[0];
|
||||
|
@ -133,6 +133,10 @@ namespace SqlSugar
|
||||
}
|
||||
public class PostgreSQLMethod : DefaultDbMethod, IDbMethods
|
||||
{
|
||||
public override string CharIndex(MethodCallExpressionModel model)
|
||||
{
|
||||
return string.Format(" (strpos ({1},{0})-1)", model.Args[0].MemberName, model.Args[1].MemberName);
|
||||
}
|
||||
public override string TrueValue()
|
||||
{
|
||||
return "true";
|
||||
|
Loading…
Reference in New Issue
Block a user