private void revokeRole(Role grantedRole) { Right right = grantee.getRightForRole(grantedRole); if (right == null) { return; } Database db = session.getDatabase(); db.removeDatabaseObject(session, right); }
public Parser(Session session) { this.database = session.getDatabase(); this.identifiersToUpper = database.getSettings().databaseToUpper; this.session = session; }
/** * Create a savepoint to allow rolling back to this state. * * @return the savepoint */ public Savepoint setSavepoint() { Savepoint sp = new Savepoint(); sp.logIndex = undoLog.size(); if (database.getMvStore() != null) { sp.transactionSavepoint = getStatementSavepoint(); } return sp; }
public Comment(Database database, int id, DbObject obj) { initDbObjectBase(database, id, getKey(obj), Trace.DATABASE); this.objectType = obj.getType(); this.objectName = obj.getSQL(); }
/** * Notifies query progress via the DatabaseEventListener */ private void setProgress() { if ((currentRowNumber & 127) == 0) { session.getDatabase().setProgress( DatabaseEventListener.STATE_STATEMENT_PROGRESS, sqlStatement, currentRowNumber, 0); } }
public synchronized void setMasterUser(User user) { lockMeta(systemSession); addDatabaseObject(systemSession, user); systemSession.commit(true); }
@Override public void setForUpdate(boolean b) { this.isForUpdate = b; if (session.getDatabase().getSettings().selectForUpdateMvcc && session.getDatabase().isMultiVersion()) { isForUpdateMvcc = b; } }
@Override public void removeChildrenAndResources(Session session) { database.removeMeta(session, getId()); invalidate(); }
@Override public synchronized void removeChildrenAndResources(Session session) { database.removeMeta(session, getId()); className = null; javaClass = null; invalidate(); }
@Override public synchronized void removeChildrenAndResources(Session session) { database.removeMeta(session, getId()); className = null; methodName = null; javaMethods = null; invalidate(); }
/** * Get the comment key name for the given database object. This key name is * used internally to associate the comment to the object. * * @param obj the object * @return the key name */ static String getKey(DbObject obj) { return getTypeName(obj.getType()) + " " + obj.getSQL(); }
/** * Create a new object. * * @param session the session */ public Prepared(Session session) { this.session = session; modificationMetaId = session.getDatabase().getModificationMetaId(); }
@Override public int compare(Value o1, Value o2) { return session.getDatabase().compare(o1, o2); } });
@Override public void setCurrentSchemaName(String schemaName) { Schema schema = database.getSchema(schemaName); setCurrentSchema(schema); }
/** * Clear the cached indexes for all sessions. * * @param database the database */ public static void clearIndexCaches(Database database) { for (Session s : database.getSessions(true)) { s.clearViewIndexCache(); } }
public DropTable(Session session, Schema schema) { super(session, schema); dropAction = session.getDatabase().getSettings().dropRestrict ? ConstraintActionType.RESTRICT : ConstraintActionType.CASCADE; }
public DropView(Session session, Schema schema) { super(session, schema); dropAction = session.getDatabase().getSettings().dropRestrict ? ConstraintActionType.RESTRICT : ConstraintActionType.CASCADE; }
public DropSchema(Session session) { super(session); dropAction = session.getDatabase().getSettings().dropRestrict ? ConstraintActionType.RESTRICT : ConstraintActionType.CASCADE; }
/** * Create a new undo log for the given session. * * @param session the session */ UndoLog(Session session) { this.database = session.getDatabase(); largeTransactions = database.getSettings().largeTransactions; }
public Analyze(Session session) { super(session); sampleRows = session.getDatabase().getSettings().analyzeSample; }