|
@ -2,6 +2,7 @@ |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
|
|
|
using System.Text.RegularExpressions; |
|
|
|
|
|
|
|
|
namespace SqlSugar |
|
|
namespace SqlSugar |
|
|
{ |
|
|
{ |
|
@ -260,9 +261,17 @@ namespace SqlSugar |
|
|
return this.Context.Ado.SqlQuery<string>(sql); |
|
|
return this.Context.Ado.SqlQuery<string>(sql); |
|
|
} |
|
|
} |
|
|
public override bool AddDefaultValue(string tableName, string columnName, string defaultValue) |
|
|
public override bool AddDefaultValue(string tableName, string columnName, string defaultValue) |
|
|
|
|
|
{ |
|
|
|
|
|
if (defaultValue?.StartsWith("'")==true&& defaultValue?.EndsWith("'") == true&& defaultValue?.Contains("(") == false) |
|
|
|
|
|
{ |
|
|
|
|
|
string sql = string.Format(AddDefaultValueSql, tableName, columnName, defaultValue); |
|
|
|
|
|
return this.Context.Ado.ExecuteCommand(sql) > 0; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
{ |
|
|
{ |
|
|
return base.AddDefaultValue(this.SqlBuilder.GetTranslationTableName(tableName), this.SqlBuilder.GetTranslationTableName(columnName), defaultValue); |
|
|
return base.AddDefaultValue(this.SqlBuilder.GetTranslationTableName(tableName), this.SqlBuilder.GetTranslationTableName(columnName), defaultValue); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
public override bool AddColumnRemark(string columnName, string tableName, string description) |
|
|
public override bool AddColumnRemark(string columnName, string tableName, string description) |
|
|
{ |
|
|
{ |
|
|
tableName = this.SqlBuilder.GetTranslationTableName(tableName); |
|
|
tableName = this.SqlBuilder.GetTranslationTableName(tableName); |
|
|