- 增加 达梦数据库 ODBC 适配,和单元测试,支持 CodeFirst 模式开发;

This commit is contained in:
28810
2019-12-09 21:25:01 +08:00
parent cc585b4cd5
commit 206d7bdbe0
46 changed files with 10682 additions and 17 deletions

View File

@ -400,7 +400,7 @@ and not exists(select 1 from all_constraints where constraint_name = a.index_nam
dropSequence(seqname);
if (seqcol.Item3)
{
var startWith = _orm.Ado.ExecuteScalar(CommandType.Text, _commonUtils.FormatSql(" select 1 from all_tab_columns where owner={0} and table_name={1} and column_name={2}", tbname[0], tbname[1], colname2)) == null ? 1 :
var startWith = _orm.Ado.ExecuteScalar(CommandType.Text, _commonUtils.FormatSql(" select 1 from all_tab_columns where owner={0} and table_name={1} and column_name={2}", tbname[0], tbname[1], seqcol.Item1.Attribute.Name)) == null ? 1 :
_orm.Ado.ExecuteScalar(CommandType.Text, $" select nvl(max({colname2})+1,1) from {tbname2}");
sb.Append("execute immediate 'CREATE SEQUENCE ").Append(_commonUtils.QuoteSqlName(seqname)).Append(" start with ").Append(startWith).Append("';\r\n");
sb.Append("execute immediate 'CREATE OR REPLACE TRIGGER ").Append(_commonUtils.QuoteSqlName(tiggerName))