- 增加 IAdo.CommandFluent(sql) 方法执行 SQL 命令;

- 修复 SqlServer SqlBulkCopy IgnoreColumns 无效的 bug;
This commit is contained in:
28810
2020-09-23 22:00:48 +08:00
parent 9b93200237
commit 8a0862d6fe
25 changed files with 225 additions and 44 deletions

View File

@@ -16,8 +16,8 @@ namespace FreeSql.Internal.CommonProvider
{
protected abstract void ReturnConnection(IObjectPool<DbConnection> pool, Object<DbConnection> conn, Exception ex);
protected abstract DbCommand CreateCommand();
protected abstract DbParameter[] GetDbParamtersByObject(string sql, object obj);
public abstract DbCommand CreateCommand();
public abstract DbParameter[] GetDbParamtersByObject(string sql, object obj);
public DbParameter[] GetDbParamtersByObject(object obj) => GetDbParamtersByObject("*", obj);
protected bool IsTracePerformance => _util?._orm?.Aop.CommandAfterHandler != null;
@@ -28,6 +28,7 @@ namespace FreeSql.Internal.CommonProvider
public string ConnectionString { get; }
public string[] SlaveConnectionStrings { get; }
public Guid Identifier { get; }
protected CommonUtils _util { get; set; }
protected int slaveUnavailables = 0;
private object slaveLock = new object();
@@ -97,6 +98,8 @@ namespace FreeSql.Internal.CommonProvider
//return props;
}
public AdoCommandFluent CommandFluent(string cmdText, object parms = null) => new AdoCommandFluent(this, cmdText, parms);
public bool ExecuteConnectTest(int commandTimeout = 0)
{
try