mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 修复 GroupBy 类型转换错误;#186
- 修复 .ToList(a => new DTO(a.id)) 报 未将对象引用设置到对象的实例 问题; #187 - 修复 update语句,二元运算解析出错; #184
This commit is contained in:
@ -160,7 +160,7 @@ namespace FreeSql.Sqlite
|
||||
//对比字段,只可以修改类型、增加字段、有限的修改字段名;保证安全不删除字段
|
||||
var tbtmp = tboldname ?? tbname;
|
||||
var dsql = _orm.Ado.ExecuteScalar(CommandType.Text, $" select sql from {tbtmp[0]}.sqlite_master where type='table' and name='{tbtmp[1]}'")?.ToString();
|
||||
var ds = _orm.Ado.ExecuteArray(CommandType.Text, $"PRAGMA {_commonUtils.QuoteSqlName(tbtmp[0])}.table_info({_commonUtils.QuoteSqlName(tbtmp[1])})");
|
||||
var ds = _orm.Ado.ExecuteArray(CommandType.Text, $"PRAGMA {_commonUtils.QuoteSqlName(tbtmp[0])}.table_info(\"{tbtmp[1]}\")");
|
||||
var tbstruct = ds.ToDictionary(a => string.Concat(a[1]), a =>
|
||||
{
|
||||
var is_identity = false;
|
||||
@ -202,7 +202,7 @@ namespace FreeSql.Sqlite
|
||||
istmpatler = true;
|
||||
}
|
||||
var dsuk = new List<string[]>();
|
||||
var dbIndexes = _orm.Ado.ExecuteArray(CommandType.Text, $"PRAGMA {_commonUtils.QuoteSqlName(tbtmp[0])}.INDEX_LIST({_commonUtils.QuoteSqlName(tbtmp[1])})");
|
||||
var dbIndexes = _orm.Ado.ExecuteArray(CommandType.Text, $"PRAGMA {_commonUtils.QuoteSqlName(tbtmp[0])}.INDEX_LIST(\"{tbtmp[1]}\")");
|
||||
foreach (var dbIndex in dbIndexes)
|
||||
{
|
||||
if (string.Concat(dbIndex[3]) == "pk") continue;
|
||||
|
Reference in New Issue
Block a user