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