Skip to content

Commit

Permalink
- 优化 LIKE 表达式解析 #1870; - 移除 OdbcDameng/OdbcKingbaseES;
Browse files Browse the repository at this point in the history
  • Loading branch information
2881099 committed Aug 9, 2024
1 parent 60b5ed5 commit 040f9bd
Show file tree
Hide file tree
Showing 116 changed files with 162 additions and 25,246 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,6 @@ public SelectImpl WhereExists(Func<SubQuery, SelectImpl> q)
case DataType.OdbcOracle:
case DataType.CustomOracle:
case DataType.Dameng:
case DataType.OdbcDameng:
case DataType.GBase:
query.Limit(-1);
break;
Expand Down
3 changes: 0 additions & 3 deletions Extensions/FreeSql.Extensions.ZeroEntity/ZeroDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,6 @@ void LocalAdd(TableInfo table, T data, bool isCheck, ColumnInfo[] _tableReturnCo
case DataType.OdbcPostgreSQL:
case DataType.CustomPostgreSQL:
case DataType.KingbaseES:
case DataType.OdbcKingbaseES:
case DataType.ShenTong:
case DataType.Firebird: //firebird 只支持单条插入 returning
if (_tableIdentitys.Length == 1 && _tableReturnColumns.Length == 1)
Expand Down Expand Up @@ -758,7 +757,6 @@ void LocalAddRange(TableInfo table, IEnumerable<T> data)
case DataType.OdbcPostgreSQL:
case DataType.CustomPostgreSQL:
case DataType.KingbaseES:
case DataType.OdbcKingbaseES:
case DataType.ShenTong:
var rets = OrmInsert(table).AppendData(data).ExecuteInserted();
_cascadeAffrows += rets.Count;
Expand Down Expand Up @@ -811,7 +809,6 @@ bool LocalCanAdd(TableInfo table, T data, bool isThrow)
case DataType.OdbcPostgreSQL:
case DataType.CustomPostgreSQL:
case DataType.KingbaseES:
case DataType.OdbcKingbaseES:
case DataType.ShenTong:
case DataType.ClickHouse:
return true;
Expand Down
4 changes: 1 addition & 3 deletions Extensions/FreeSql.Generator/RazorModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ public string GetColumnAttribute(DbColumnInfo col, bool isInsertValueSql = false
case DataType.PostgreSQL:
case DataType.OdbcPostgreSQL:
case DataType.KingbaseES:
case DataType.OdbcKingbaseES:
case DataType.ShenTong:
switch (col.DbTypeTextFull.ToLower())
{
Expand All @@ -157,7 +156,6 @@ public string GetColumnAttribute(DbColumnInfo col, bool isInsertValueSql = false
}
break;
case DataType.Dameng:
case DataType.OdbcDameng:
switch (col.DbTypeTextFull.ToLower())
{
case "text": sb.Add("StringLength = -2"); break;
Expand Down Expand Up @@ -245,7 +243,7 @@ public string GetColumnDefaultValue(DbColumnInfo col, bool isInsertValueSql)
if ((cstype == typeof(string) && defval.StartsWith("'") && defval.EndsWith("'::character varying") ||
cstype == typeof(Guid) && defval.StartsWith("'") && defval.EndsWith("'::uuid")
) && (fsql.Ado.DataType == DataType.PostgreSQL || fsql.Ado.DataType == DataType.OdbcPostgreSQL ||
fsql.Ado.DataType == DataType.KingbaseES || fsql.Ado.DataType == DataType.OdbcKingbaseES ||
fsql.Ado.DataType == DataType.KingbaseES ||
fsql.Ado.DataType == DataType.ShenTong))
{
defval = defval.Substring(1, defval.LastIndexOf("'::") - 1).Replace("''", "'");
Expand Down
1 change: 0 additions & 1 deletion FreeSql.DbContext/DbSet/DbSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ bool CanAdd(TEntity data, bool isThrow)
case DataType.OdbcPostgreSQL:
case DataType.CustomPostgreSQL:
case DataType.KingbaseES:
case DataType.OdbcKingbaseES:
case DataType.ShenTong:
case DataType.ClickHouse:
return true;
Expand Down
2 changes: 0 additions & 2 deletions FreeSql.DbContext/DbSet/DbSetAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ async Task AddPrivAsync(TEntity data, bool isCheck, CancellationToken cancellati
case DataType.OdbcPostgreSQL:
case DataType.CustomPostgreSQL:
case DataType.KingbaseES:
case DataType.OdbcKingbaseES:
case DataType.ShenTong:
case DataType.Firebird: //firebird 只支持单条插入 returning
if (_tableIdentitys.Length == 1 && _tableReturnColumns.Length == 1)
Expand Down Expand Up @@ -115,7 +114,6 @@ async public Task AddRangeAsync(IEnumerable<TEntity> data, CancellationToken can
case DataType.OdbcPostgreSQL:
case DataType.CustomPostgreSQL:
case DataType.KingbaseES:
case DataType.OdbcKingbaseES:
case DataType.ShenTong:
await DbContextFlushCommandAsync(cancellationToken);
var rets = await this.OrmInsert(data).ExecuteInsertedAsync(cancellationToken);
Expand Down
2 changes: 0 additions & 2 deletions FreeSql.DbContext/DbSet/DbSetSync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ void AddPriv(TEntity data, bool isCheck)
case DataType.OdbcPostgreSQL:
case DataType.CustomPostgreSQL:
case DataType.KingbaseES:
case DataType.OdbcKingbaseES:
case DataType.ShenTong:
case DataType.Firebird: //firebird 只支持单条插入 returning
if (_tableIdentitys.Length == 1 && _tableReturnColumns.Length == 1)
Expand Down Expand Up @@ -118,7 +117,6 @@ public void AddRange(IEnumerable<TEntity> data)
case DataType.OdbcPostgreSQL:
case DataType.CustomPostgreSQL:
case DataType.KingbaseES:
case DataType.OdbcKingbaseES:
case DataType.ShenTong:
DbContextFlushCommand();
var rets = this.OrmInsert(data).ExecuteInserted();
Expand Down

This file was deleted.

Loading

0 comments on commit 040f9bd

Please sign in to comment.