Ejemplo n.º 1
0
 public PostgreSqlScriptRunner(
     DatabaseEnvironment environment,
     ISqlConnectionPool connectionPool)
 {
     _connectionPool = connectionPool;
     _environment    = environment;
 }
Ejemplo n.º 2
0
 public SqlDataSource(ISqlConnectionPool pool, bool createIfNotExists)
 {
     _connectionPool          = pool;
     m_bCreateIfNotExists     = createIfNotExists;
     m_ConnectionDroppedRegex = new List <String>();
     m_bReadOnly  = false;
     m_LogReducer = new LogOutputAggregator(Log, LogAggregatorInterval);
 }
Ejemplo n.º 3
0
 public DatabaseDataReader(ISqlConnectionPool pool, DatabaseConnection conn, DbDataReader rdr)
 {
     m_bWasDisposed = false;
     m_bReleaseConnectionOnClose = true;
     m_Reader     = rdr;
     m_Connection = conn;
     m_Pool       = pool;
 }
Ejemplo n.º 4
0
 public ExecutionManager(
     ISqlScriptsAccessor scriptsAccessor,
     ISqlConnectionPool connectionPool,
     ISqlScriptRunner runner)
 {
     _scriptsAccessor = scriptsAccessor ?? throw new ArgumentNullException(nameof(scriptsAccessor));
     _connectionPool  = connectionPool;
     _runner          = runner ?? throw new ArgumentNullException(nameof(runner));
     _executedScripts = new Dictionary <string, ICollection <ScriptInfo> >();
 }
 public MySqlNativeDataSource(ISqlConnectionPool pool)
     : base(pool)
 {
     ConnectionDroppedRegexes = new List <String>()
     {
         "Fatal error encountered during command execution",
         "Fatal error encountered attempting to read the resultset",
         "current state is closed",
         " disabled",
         "Server closed the connection",
         "connection is closed",
         "requires an open connection",
         "timeout period elapsed prior to completion",
         "Deadlock found when trying to get lock",
     };
 }
Ejemplo n.º 6
0
 public void Close()
 {
     if (m_Reader != null)
     {
         if (!m_Reader.IsClosed)
         {
             m_Reader.Close();
         }
         m_Reader = null;
     }
     if (m_bReleaseConnectionOnClose && m_Pool != null && m_Connection != null)
     {
         m_Pool.ReleaseConnection(m_Connection);
     }
     m_Pool       = null;
     m_Connection = null;
 }
Ejemplo n.º 7
0
 public MySqlDataSource(ISqlConnectionPool pool)
     : base(pool)
 {
 }
Ejemplo n.º 8
0
 public SqlDataSource(ISqlConnectionPool pool)
     : this(pool, false)
 {
 }