mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-27 03:09:34 +08:00
Optimized code
This commit is contained in:
@@ -264,7 +264,10 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
subSql = Regex.Replace(subSql, @" \[\w+?\]\.| ""\w+?""\.| \`\w+?\`\.", name + ".");
|
var p=(base.BaseParameter?.BaseParameter?.CurrentExpression as LambdaExpression)?.Parameters[0].Name;
|
||||||
|
subSql = subSql.Replace(this.Context.SqlTranslationLeft+p+this.Context.SqlTranslationRight+".",name + ".") ;
|
||||||
|
subSql = subSql.Replace(this.Context.SqlTranslationLeft + p.ToUpper() + this.Context.SqlTranslationRight + ".", name + ".");
|
||||||
|
subSql = subSql.Replace(this.Context.SqlTranslationLeft + p.ToLower() + this.Context.SqlTranslationRight + ".", name + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parameter.Context.Result.Append(subSql);
|
parameter.Context.Result.Append(subSql);
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ namespace SqlSugar
|
|||||||
#region Methods
|
#region Methods
|
||||||
public override void AddDefaultValue(EntityInfo entityInfo)
|
public override void AddDefaultValue(EntityInfo entityInfo)
|
||||||
{
|
{
|
||||||
Console.WriteLine("sqlite no support AddDefaultValue");
|
//sqlite no support AddDefaultValue
|
||||||
}
|
}
|
||||||
public override bool AddDefaultValue(string tableName, string columnName, string defaultValue)
|
public override bool AddDefaultValue(string tableName, string columnName, string defaultValue)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -264,7 +264,10 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
subSql = Regex.Replace(subSql, @" \[\w+?\]\.| ""\w+?""\.| \`\w+?\`\.", name + ".");
|
var p=(base.BaseParameter?.BaseParameter?.CurrentExpression as LambdaExpression)?.Parameters[0].Name;
|
||||||
|
subSql = subSql.Replace(this.Context.SqlTranslationLeft+p+this.Context.SqlTranslationRight+".",name + ".") ;
|
||||||
|
subSql = subSql.Replace(this.Context.SqlTranslationLeft + p.ToUpper() + this.Context.SqlTranslationRight + ".", name + ".");
|
||||||
|
subSql = subSql.Replace(this.Context.SqlTranslationLeft + p.ToLower() + this.Context.SqlTranslationRight + ".", name + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parameter.Context.Result.Append(subSql);
|
parameter.Context.Result.Append(subSql);
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ namespace SqlSugar
|
|||||||
#region Methods
|
#region Methods
|
||||||
public override void AddDefaultValue(EntityInfo entityInfo)
|
public override void AddDefaultValue(EntityInfo entityInfo)
|
||||||
{
|
{
|
||||||
Console.WriteLine("sqlite no support AddDefaultValue");
|
//sqlite no support AddDefaultValue
|
||||||
}
|
}
|
||||||
public override bool AddDefaultValue(string tableName, string columnName, string defaultValue)
|
public override bool AddDefaultValue(string tableName, string columnName, string defaultValue)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user