Example #1
0
 /**
  * Create a savepoint that is linked to the current log position.
  *
  * @param name the savepoint name
  */
 public void addSavepoint(String name) {
   if (savepoints == null) {
     savepoints = database.newStringMap();
   }
   Savepoint sp = new Savepoint();
   savepoints.put(name, sp);
 }
Example #2
0
 /**
  * Add a local temporary index to this session.
  *
  * @param index the index to add
  * @throws DbException if a index with this name already exists
  */
 public void addLocalTempTableIndex(Index index) {
   if (localTempTableIndexes == null) {
     localTempTableIndexes = database.newStringMap();
   }
   if (localTempTableIndexes.get(index.getName()) != null) {
     throw DbException.get(ErrorCode.INDEX_ALREADY_EXISTS_1, index.getSQL());
   }
   localTempTableIndexes.put(index.getName(), index);
 }
Example #3
0
 /**
  * Add a local temporary constraint to this session.
  *
  * @param constraint the constraint to add
  * @throws DbException if a constraint with the same name already exists
  */
 public void addLocalTempTableConstraint(Constraint constraint) {
   if (localTempTableConstraints == null) {
     localTempTableConstraints = database.newStringMap();
   }
   String name = constraint.getName();
   if (localTempTableConstraints.get(name) != null) {
     throw DbException.get(ErrorCode.CONSTRAINT_ALREADY_EXISTS_1, constraint.getSQL());
   }
   localTempTableConstraints.put(name, constraint);
 }
Example #4
0
 /**
  * Add a local temporary table to this session.
  *
  * @param table the table to add
  * @throws DbException if a table with this name already exists
  */
 public void addLocalTempTable(Table table) {
   if (localTempTables == null) {
     localTempTables = database.newStringMap();
   }
   if (localTempTables.get(table.getName()) != null) {
     throw DbException.get(ErrorCode.TABLE_OR_VIEW_ALREADY_EXISTS_1, table.getSQL());
   }
   modificationId++;
   localTempTables.put(table.getName(), table);
 }
Example #5
0
 /**
  * Create a savepoint that is linked to the current log position.
  *
  * @param name the savepoint name
  */
 public void addSavepoint(String name) {
   if (savepoints == null) {
     savepoints = database.newStringMap();
   }
   Savepoint sp = new Savepoint();
   sp.logIndex = undoLog.size();
   if (database.getMvStore() != null) {
     sp.transactionSavepoint = getStatementSavepoint();
   }
   savepoints.put(name, sp);
 }
Example #6
0
 /**
  * Create a savepoint that is linked to the current log position.
  *
  * @param name the savepoint name
  */
 public void addSavepoint(String name) {
   if (savepoints == null) {
     savepoints = database.newStringMap();
   }
   savepoints.put(name, getUndoLogPos());
 }
Example #7
0
 private void initVariables() {
   if (variables == null) {
     variables = database.newStringMap();
   }
 }
Example #8
0
 /**
  * Add a procedure to this session.
  *
  * @param procedure the procedure to add
  */
 public void addProcedure(Procedure procedure) {
   if (procedures == null) {
     procedures = database.newStringMap();
   }
   procedures.put(procedure.getName(), procedure);
 }