mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 04:13:48 +08:00
Synchronization code
This commit is contained in:
parent
b9c19ba4e5
commit
7d4dc4a558
@ -9,6 +9,7 @@ namespace SqlSugar
|
||||
{
|
||||
public partial class DefaultDbMethod : IDbMethods
|
||||
{
|
||||
public virtual string ParameterKeyWord { get; set; }= "@";
|
||||
public virtual string RowNumber(MethodCallExpressionModel model)
|
||||
{
|
||||
if (model.Args.Count == 1)
|
||||
@ -901,7 +902,7 @@ namespace SqlSugar
|
||||
}
|
||||
}
|
||||
//Regex regex = new Regex("\@");
|
||||
if (!sql.Contains("@"))
|
||||
if (!sql.Contains(ParameterKeyWord))
|
||||
{
|
||||
sql = sql.Replace(" =)", $" = {newValue})");
|
||||
if (!sql.Contains(newValue))
|
||||
@ -911,7 +912,7 @@ namespace SqlSugar
|
||||
}
|
||||
else
|
||||
{
|
||||
Regex reg = new Regex(@"@MethodConst\d+");
|
||||
Regex reg = new Regex(ParameterKeyWord + @"MethodConst\d+");
|
||||
sql = reg.Replace(sql, it =>
|
||||
{
|
||||
return " " + newValue + " ";
|
||||
|
@ -54,6 +54,7 @@ namespace SqlSugar
|
||||
}
|
||||
public partial class DmMethod : DefaultDbMethod, IDbMethods
|
||||
{
|
||||
public override string ParameterKeyWord { get; set; } = ":";
|
||||
public override string GetStringJoinSelector(string result, string separator)
|
||||
{
|
||||
return $"listagg(to_char({result}),'{separator}') within group(order by {result}) ";
|
||||
|
@ -72,6 +72,7 @@ namespace SqlSugar
|
||||
}
|
||||
public partial class OracleMethod : DefaultDbMethod, IDbMethods
|
||||
{
|
||||
public override string ParameterKeyWord { get; set; } = ":";
|
||||
public override string Modulo(MethodCallExpressionModel model)
|
||||
{
|
||||
return " MOD(" + model.Args[0].MemberName+ " , " + model.Args[1].MemberName+")";
|
||||
|
Loading…
Reference in New Issue
Block a user