示例#1
0
 public ConnectionHolder(Session session) {
   Database database = session.getDatabase();
   JdbcRepository repository = (JdbcRepository) database.getRepository();
   this.session = session;
   this.trace = database.getTrace(Trace.TRANSACTION);
   this.target = repository.getConnectionProvider();
   String mode = database.getSettings().transactionMode;
   this.holderStrategy = transactionMode(mode);
 }
示例#2
0
 /**
  * Construct a local result object.
  *
  * @param session the session
  * @param expressions the expression array
  * @param visibleColumnCount the number of visible columns
  */
 public LocalResult(Session session, Expression[] expressions, int visibleColumnCount) {
   this.session = session;
   if (session == null) {
     this.maxMemoryRows = Integer.MAX_VALUE;
   } else {
     this.maxMemoryRows = session.getDatabase().getMaxMemoryRows();
   }
   rows = New.arrayList(20);
   this.visibleColumnCount = visibleColumnCount;
   rowId = -1;
   this.expressions = expressions;
 }