diff --git a/FreeSql/FreeSql.xml b/FreeSql/FreeSql.xml index 9843c757a..7e96ab0aa 100644 --- a/FreeSql/FreeSql.xml +++ b/FreeSql/FreeSql.xml @@ -1084,82 +1084,6 @@ - - - 动态创建实体类型 - - - - - 配置Class - - 类名 - 类标记的特性[Table(Name = "xxx")] [Index(xxxx)] - - - - - 配置属性 - - 属性名称 - 属性类型 - 属性标记的特性-支持多个 - - - - - 配置属性 - - 属性名称 - 属性类型 - 该属性是否重写父类属性 - 属性标记的特性-支持多个 - - - - - 配置属性 - - 属性名称 - 属性类型 - 该属性是否重写父类属性 - 属性默认值 - 属性标记的特性-支持多个 - - - - - 配置父类 - - 父类类型 - - - - - Override属性 - - - - - - Emit动态创建出Class - Type - - - - - - 首字母小写 - - - - - - - 首字母大写 - - - - 获取实体的主键值,以 "*|_,[,_|*" 分割,当任意一个主键属性无值时,返回 null @@ -5843,28 +5767,6 @@ 请使用 fsql.InsertDict(dict) 方法插入字典数据 - - - 动态构建Class Type - - - - - - 根据字典,创建 table 对应的实体对象 - - - - - - - - 根据实体对象,创建 table 对应的字典 - - - - - C#: that >= between && that <= and diff --git a/Providers/FreeSql.Provider.Xugu/Curd/XuguInsert.cs b/Providers/FreeSql.Provider.Xugu/Curd/XuguInsert.cs index 3520eea6f..a3174a8a8 100644 --- a/Providers/FreeSql.Provider.Xugu/Curd/XuguInsert.cs +++ b/Providers/FreeSql.Provider.Xugu/Curd/XuguInsert.cs @@ -63,7 +63,7 @@ protected override long RawExecuteIdentity() //using (var command = cmd.Connection.CreateCommand()) { //command.CommandType = CommandType.Text; - var sqlIdentity = $"SELECT {_commonUtils.QuoteSqlName(identCols.First().Value.Attribute.Name)} FROM {_table.DbName} WHERE \"ROWID\"='{rowid}'"; + var sqlIdentity = $"SELECT {_commonUtils.QuoteSqlName(identCols.First().Value.Attribute.Name)} FROM {_commonUtils.QuoteSqlName(TableRuleInvoke())} WHERE \"ROWID\"='{rowid}'"; //command.CommandText = sql; @@ -91,11 +91,6 @@ protected override long RawExecuteIdentity() protected override List RawExecuteInserted() { - - - - - var sql = this.ToSql(); if (string.IsNullOrEmpty(sql)) return null; @@ -119,7 +114,7 @@ protected override List RawExecuteInserted() { var rowid = (cmd as XGCommand).get_insert_rowid(); - var sqlIdentity = $"SELECT {sbColumn} FROM {_table.DbName} WHERE \"ROWID\"='{rowid}'"; + var sqlIdentity = $"SELECT {sbColumn} FROM {_commonUtils.QuoteSqlName(TableRuleInvoke())} WHERE \"ROWID\"='{rowid}'"; ret = _orm.Ado.Query(_table.TypeLazy ?? _table.Type, _connection, _transaction, CommandType.Text, sqlIdentity, _commandTimeout, _params); @@ -147,8 +142,6 @@ protected override List RawExecuteInserted() async protected override Task RawExecuteIdentityAsync(CancellationToken cancellationToken = default) { - - var sql = this.ToSql(); if (string.IsNullOrEmpty(sql)) return 0; @@ -170,7 +163,7 @@ async protected override Task RawExecuteIdentityAsync(CancellationToken ca await _orm.Ado.ExecuteNonQueryAsync(_connection, _transaction, CommandType.Text, sql, _commandTimeout, cmd => { var rowid = (cmd as XGCommand).get_insert_rowid(); - var sqlIdentity = $"SELECT {_commonUtils.QuoteSqlName(identCols.First().Value.Attribute.Name)} FROM {_table.DbName} WHERE \"ROWID\"='{rowid}'"; + var sqlIdentity = $"SELECT {_commonUtils.QuoteSqlName(identCols.First().Value.Attribute.Name)} FROM {_commonUtils.QuoteSqlName(TableRuleInvoke())} WHERE \"ROWID\"='{rowid}'"; if (!long.TryParse(_orm.Ado.ExecuteScalar(CommandType.Text, sqlIdentity, _params).ToString(), out ret)) { @@ -193,11 +186,6 @@ await _orm.Ado.ExecuteNonQueryAsync(_connection, _transaction, CommandType.Text, } async protected override Task> RawExecuteInsertedAsync(CancellationToken cancellationToken = default) { - - - - - var sql = this.ToSql(); if (string.IsNullOrEmpty(sql)) return null; @@ -219,7 +207,7 @@ await _orm.Ado.ExecuteNonQueryAsync(_connection, _transaction, CommandType.Text, { var rowid = (cmd as XGCommand).get_insert_rowid(); - var sqlIdentity = $"SELECT {sbColumn} FROM {_table.DbName} WHERE \"ROWID\"='{rowid}'"; + var sqlIdentity = $"SELECT {sbColumn} FROM {_commonUtils.QuoteSqlName(TableRuleInvoke())} WHERE \"ROWID\"='{rowid}'"; ret = _orm.Ado.Query(_table.TypeLazy ?? _table.Type, _connection, _transaction, CommandType.Text, sqlIdentity, _commandTimeout, _params); return Task.CompletedTask;