public H2Command(string commandText, H2Connection connection, H2Transaction transaction) { this.commandText = commandText; this.connection = connection; this.collection = new H2ParameterCollection(); this.updatedRowSource = UpdateRowSource.None; }
public H2Command(string commandText, H2Connection connection, H2Transaction transaction) { _commandText = commandText; Connection = connection; Parameters = new H2ParameterCollection(); UpdatedRowSource = UpdateRowSource.None; }
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; } }
internal H2Connection(Connection self) { this.connection = self; if (H2Helper.GetAdoTransactionLevel(self.getTransactionIsolation()) != IsolationLevel.Unspecified) { this.transaction = new H2Transaction(this); } }
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); }
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; }