mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 增加 IAdo.ConnectionString 属性返回 UseConnectionString 传入的值;
This commit is contained in:
		@@ -2128,6 +2128,16 @@
 | 
			
		||||
            数据库类型
 | 
			
		||||
            </summary>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="P:FreeSql.IAdo.ConnectionString">
 | 
			
		||||
            <summary>
 | 
			
		||||
            UseConnectionString 时候的值
 | 
			
		||||
            </summary>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="P:FreeSql.IAdo.SlaveConnectionStrings">
 | 
			
		||||
            <summary>
 | 
			
		||||
            UseSalve 时候的值
 | 
			
		||||
            </summary>
 | 
			
		||||
        </member>
 | 
			
		||||
        <member name="M:FreeSql.IAdo.Transaction(System.Action)">
 | 
			
		||||
            <summary>
 | 
			
		||||
            开启事务(不支持异步),60秒未执行完成(可能)被其他线程事务自动提交
 | 
			
		||||
 
 | 
			
		||||
@@ -24,6 +24,14 @@ namespace FreeSql
 | 
			
		||||
        /// 数据库类型
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        DataType DataType { get; }
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// UseConnectionString 时候的值
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        string ConnectionString { get; }
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// UseSalve 时候的值
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        string[] SlaveConnectionStrings { get; }
 | 
			
		||||
 | 
			
		||||
        #region 事务
 | 
			
		||||
        /// <summary>
 | 
			
		||||
 
 | 
			
		||||
@@ -24,14 +24,18 @@ namespace FreeSql.Internal.CommonProvider
 | 
			
		||||
        public IObjectPool<DbConnection> MasterPool { get; protected set; }
 | 
			
		||||
        public List<IObjectPool<DbConnection>> SlavePools { get; } = new List<IObjectPool<DbConnection>>();
 | 
			
		||||
        public DataType DataType { get; }
 | 
			
		||||
        public string ConnectionString { get; }
 | 
			
		||||
        public string[] SlaveConnectionStrings { get; }
 | 
			
		||||
        protected CommonUtils _util { get; set; }
 | 
			
		||||
        protected int slaveUnavailables = 0;
 | 
			
		||||
        private object slaveLock = new object();
 | 
			
		||||
        private Random slaveRandom = new Random();
 | 
			
		||||
 | 
			
		||||
        public AdoProvider(DataType dataType)
 | 
			
		||||
        public AdoProvider(DataType dataType, string connectionString, string[] slaveConnectionStrings)
 | 
			
		||||
        {
 | 
			
		||||
            this.DataType = dataType;
 | 
			
		||||
            this.ConnectionString = connectionString;
 | 
			
		||||
            this.SlaveConnectionStrings = slaveConnectionStrings;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        void LoggerException(IObjectPool<DbConnection> pool, PrepareCommandResult pc, Exception ex, DateTime dt, StringBuilder logtxt, bool isThrowException = true)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user