mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 02:29:39 +08:00
Update SqlSugar.MySqlConnectorCore
This commit is contained in:
@@ -341,6 +341,10 @@ namespace SqlSugar.MySqlConnector
|
|||||||
{
|
{
|
||||||
if (item.ColumnDescription != null)
|
if (item.ColumnDescription != null)
|
||||||
{
|
{
|
||||||
|
if (item.UnderType == UtilConstants.GuidType && item.Length == 0)
|
||||||
|
{
|
||||||
|
item.Length = 36;
|
||||||
|
}
|
||||||
var mySqlCodeFirst = this.Context.CodeFirst as MySqlCodeFirst;
|
var mySqlCodeFirst = this.Context.CodeFirst as MySqlCodeFirst;
|
||||||
string sql = GetUpdateColumnSql(entity.DbTableName, mySqlCodeFirst.GetEntityColumnToDbColumn(entity, entity.DbTableName, item))+" "+(item.IsIdentity? "AUTO_INCREMENT" : "")+" " + " COMMENT '" + item.ColumnDescription + "'";
|
string sql = GetUpdateColumnSql(entity.DbTableName, mySqlCodeFirst.GetEntityColumnToDbColumn(entity, entity.DbTableName, item))+" "+(item.IsIdentity? "AUTO_INCREMENT" : "")+" " + " COMMENT '" + item.ColumnDescription + "'";
|
||||||
db.Ado.ExecuteCommand(sql);
|
db.Ado.ExecuteCommand(sql);
|
||||||
|
@@ -54,7 +54,7 @@ namespace SqlSugar.MySqlConnector
|
|||||||
}
|
}
|
||||||
public override IDataAdapter GetAdapter()
|
public override IDataAdapter GetAdapter()
|
||||||
{
|
{
|
||||||
return new MySqlConnectorDataAdapter();
|
return new MySqlDataAdapter();
|
||||||
}
|
}
|
||||||
public override DbCommand GetCommand(string sql, SugarParameter[] parameters)
|
public override DbCommand GetCommand(string sql, SugarParameter[] parameters)
|
||||||
{
|
{
|
||||||
@@ -75,7 +75,7 @@ namespace SqlSugar.MySqlConnector
|
|||||||
}
|
}
|
||||||
public override void SetCommandToAdapter(IDataAdapter dataAdapter, DbCommand command)
|
public override void SetCommandToAdapter(IDataAdapter dataAdapter, DbCommand command)
|
||||||
{
|
{
|
||||||
((MySqlConnectorDataAdapter)dataAdapter).SelectCommand = (MySqlCommand)command;
|
((MySqlDataAdapter)dataAdapter).SelectCommand = (MySqlCommand)command;
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// if mysql return MySqlParameter[] pars
|
/// if mysql return MySqlParameter[] pars
|
||||||
|
Reference in New Issue
Block a user