Examples of checkAdmin()


Examples of org.h2.engine.User.checkAdmin()

    public int update() {
        session.getUser().checkAdmin();
        session.commit(true);
        Database db = session.getDatabase();
        User user = db.getUser(authorization);
        user.checkAdmin();
        if (db.findSchema(schemaName) != null) {
            if (ifNotExists) {
                return 0;
            }
            throw DbException.get(ErrorCode.SCHEMA_ALREADY_EXISTS_1, schemaName);
View Full Code Here

Examples of org.h2.engine.User.checkAdmin()

    public int update() {
        session.getUser().checkAdmin();
        session.commit(true);
        Database db = session.getDatabase();
        User user = db.getUser(authorization);
        user.checkAdmin();
        if (db.findSchema(schemaName) != null) {
            if (ifNotExists) {
                return 0;
            }
            throw DbException.get(ErrorCode.SCHEMA_ALREADY_EXISTS_1, schemaName);
View Full Code Here

Examples of org.lealone.dbobject.User.checkAdmin()

    public int update() {
        session.getUser().checkAdmin();
        session.commit(true);
        Database db = session.getDatabase();
        User user = db.getUser(authorization);
        user.checkAdmin();
        if (db.findSchema(schemaName) != null) {
            if (ifNotExists) {
                return 0;
            }
            throw DbException.get(ErrorCode.SCHEMA_ALREADY_EXISTS_1, schemaName);
View Full Code Here

Examples of org.lealone.dbobject.User.checkAdmin()

    @Override
    public int update() {
        session.getUser().checkAdmin();
        session.commit(true);
        User user = session.getUser();
        user.checkAdmin();

        try {
            KSMetaData ksm = Schema.instance.getKSMetaData(keyspaceName);
            // In the (very) unlikely case the keyspace was dropped since validate()
            if (ksm == null) //validate方法中已检查过了,如果存在一些并发场景,有可能在validate方法到这里之间把ks删除了
View Full Code Here

Examples of org.lealone.dbobject.User.checkAdmin()

    public int update() {
        session.getUser().checkAdmin();
        session.commit(true);
        Database db = session.getDatabase();
        User user = db.getUser(authorization);
        user.checkAdmin();
        try {
            MigrationManager.announceNewKeyspace(defs.asKSMetadata(keyspaceName));
        } catch (AlreadyExistsException e) {
            if (!ifNotExists)
                throw DbException.convert(e);
View Full Code Here

Examples of org.lealone.dbobject.User.checkAdmin()

    @Override
    public int update() {
        session.getUser().checkAdmin();
        session.commit(true);
        User user = session.getUser();
        user.checkAdmin();

        try {
            MigrationManager.announceKeyspaceDrop(keyspaceName, false);
        } catch (ConfigurationException e) {
            if (!ifExists)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.