/** * Initialize some attributes of this object. * * @param db the database * @param objectId the object id * @param name the name * @param traceModule the trace module name */ protected void initDbObjectBase(Database db, String name) { this.database = db; this.id = db.allocateObjectId(); this.objectName = name; this.trace = database.getTrace(Trace.DATABASE); }
/** * Get the current object id, or get a new id from the database. The object * id is used when creating new database object (CREATE statement). * * @return the object id */ protected int getObjectId() { int id = objectId; if (id == 0) { id = session.getDatabase().allocateObjectId(); } else { objectId = 0; } return id; }
data.id = database.allocateObjectId(); data.columns = columns; data.tableName = tempViewName; session.removeLocalTempTable(recursiveTable); int id = database.allocateObjectId(); TableView view = new TableView(schema, id, tempViewName, querySQL, null, cols, session, true);