public H2Command(string commandText, H2Connection connection, H2Transaction transaction)
 {
     this.commandText      = commandText;
     this.connection       = connection;
     this.collection       = new H2ParameterCollection();
     this.updatedRowSource = UpdateRowSource.None;
 }
Exemplo n.º 2
0
 public H2Command(string commandText, H2Connection connection, H2Transaction transaction)
 {
     _commandText     = commandText;
     Connection       = connection;
     Parameters       = new H2ParameterCollection();
     UpdatedRowSource = UpdateRowSource.None;
 }
Exemplo n.º 3
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     if (disposing)
     {
         if (IsOpen)
         {
             if (transaction != null)
             {
                 transaction.Dispose();
                 transaction = null;
             }
             if (pool != null)
             {
                 pool.Enqueue(connection);
                 connection = null;
             }
             else
             {
                 connection.close();
                 connection = null;
             }
         }
         userName = null;
         password = null;
     }
 }
Exemplo n.º 4
0
 internal H2Connection(Connection self)
 {
     this.connection = self;
     if (H2Helper.GetAdoTransactionLevel(self.getTransactionIsolation()) != IsolationLevel.Unspecified)
     {
         this.transaction = new H2Transaction(this);
     }
 }
Exemplo n.º 5
0
 internal H2Connection(Connection self)
 {
     this.connection = self;
     if (H2Helper.GetAdoTransactionLevel(self.getTransactionIsolation()) != IsolationLevel.Unspecified)
     {
         this.transaction = new H2Transaction(this);
     }
 }
Exemplo n.º 6
0
 public new H2Transaction BeginTransaction(IsolationLevel isolationLevel)
 {
     CheckIsOpen();
     if (isolationLevel == IsolationLevel.Unspecified)
     {
         isolationLevel = IsolationLevel.ReadCommitted;
     }
     if (transaction != null)
     {
         throw new InvalidOperationException();
     }
     try{
         connection.setTransactionIsolation(H2Helper.GetJdbcTransactionLevel(isolationLevel));
     }
     catch (org.h2.jdbc.JdbcSQLException ex)
     {
         throw new H2Exception(ex);
     }
     transaction = new H2Transaction(this);
     return(transaction);
 }
Exemplo n.º 7
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     if (disposing)
     {
         if (IsOpen)
         {
             if (transaction != null)
             {
                 transaction.Dispose();
                 transaction = null;
             }
             if (pool != null)
             {
                 pool.Enqueue(connection);
                 connection = null;
             }
             else
             {
                 connection.close();
                 connection = null;
             }
         }
         userName = null;
         password = null;
     }
 }
Exemplo n.º 8
0
 public new H2Transaction BeginTransaction(IsolationLevel isolationLevel)
 {
     CheckIsOpen();
     if (isolationLevel == IsolationLevel.Unspecified)
     {
         isolationLevel = IsolationLevel.ReadCommitted;
     }
     if (transaction != null) { throw new InvalidOperationException(); }
     try{
     connection.setTransactionIsolation(H2Helper.GetJdbcTransactionLevel(isolationLevel));
     }
     catch (org.h2.jdbc.JdbcSQLException ex)
     {
         throw new H2Exception(ex);
     }
     transaction = new H2Transaction(this);
     return transaction;
 }
Exemplo n.º 9
0
 public H2Command(string commandText, H2Connection connection, H2Transaction transaction)
 {
     this.commandText = commandText;
     this.connection = connection;
     this.collection = new H2ParameterCollection();
     this.updatedRowSource = UpdateRowSource.None;
 }