mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
Update dm
This commit is contained in:
@@ -43,6 +43,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return "other";
|
return "other";
|
||||||
}
|
}
|
||||||
|
else if (dbTypeName == "sbyte")
|
||||||
|
{
|
||||||
|
return "byte";
|
||||||
|
}
|
||||||
else if (dbTypeName == "xml" || dbTypeName == "string")
|
else if (dbTypeName == "xml" || dbTypeName == "string")
|
||||||
{
|
{
|
||||||
return "string";
|
return "string";
|
||||||
|
@@ -359,6 +359,10 @@ namespace SqlSugar
|
|||||||
private List<DbColumnInfo> GetColumnInfosByTableName(string tableName)
|
private List<DbColumnInfo> GetColumnInfosByTableName(string tableName)
|
||||||
{
|
{
|
||||||
string sql = "select * from " + SqlBuilder.GetTranslationTableName(tableName) + " WHERE 1=2 ";
|
string sql = "select * from " + SqlBuilder.GetTranslationTableName(tableName) + " WHERE 1=2 ";
|
||||||
|
if (!this.GetTableInfoList(false).Any(it => it.Name == SqlBuilder.GetTranslationTableName(tableName).TrimStart('\"').TrimEnd('\"')))
|
||||||
|
{
|
||||||
|
sql = "select * from \"" + tableName + "\" WHERE 1=2 ";
|
||||||
|
}
|
||||||
var oldIsEnableLog = this.Context.Ado.IsEnableLogEvent;
|
var oldIsEnableLog = this.Context.Ado.IsEnableLogEvent;
|
||||||
this.Context.Ado.IsEnableLogEvent = false;
|
this.Context.Ado.IsEnableLogEvent = false;
|
||||||
using(DbDataReader reader = (DbDataReader) this.Context.Ado.GetDataReader(sql))
|
using(DbDataReader reader = (DbDataReader) this.Context.Ado.GetDataReader(sql))
|
||||||
|
Reference in New Issue
Block a user