Package org.h2.engine

Examples of org.h2.engine.Database.update()


            user.setAdmin(admin);
            break;
        default:
            DbException.throwInternalError("type=" + type);
        }
        db.update(session, user);
        return 0;
    }

    public int getType() {
        return type;
View Full Code Here


        Database db = session.getDatabase();
        session.getUser().checkRight(table, Right.ALL);
        table.checkSupportAlter();
        table.renameColumn(column, newName);
        table.setModified();
        db.update(session, table);
        for (DbObject child : table.getChildren()) {
            if (child.getCreateSQL() != null) {
                db.update(session, child);
            }
        }
View Full Code Here

        table.renameColumn(column, newName);
        table.setModified();
        db.update(session, table);
        for (DbObject child : table.getChildren()) {
            if (child.getCreateSQL() != null) {
                db.update(session, child);
            }
        }
        return 0;
    }
View Full Code Here

            setting.setIntValue(v);
        }
        if (addNew) {
            database.addDatabaseObject(session, setting);
        } else {
            database.update(session, setting);
        }
    }

    public boolean needRecompile() {
        return false;
View Full Code Here

        for (int j = 0; j < columns.length; j++) {
            int selectivity = result.currentRow()[j].getInt();
            columns[j].setSelectivity(selectivity);
        }
        if (manual) {
            db.update(session, table);
        } else {
            Session s = db.getSystemSession();
            db.update(s, table);
            s.commit(true);
        }
View Full Code Here

        }
        if (manual) {
            db.update(session, table);
        } else {
            Session s = db.getSystemSession();
            db.update(s, table);
            s.commit(true);
        }
    }

    public void setTop(int top) {
View Full Code Here

        }
        session.getUser().checkAdmin();
        db.renameDatabaseObject(session, oldSchema, newSchemaName);
        ArrayList<SchemaObject> all = db.getAllSchemaObjects();
        for (SchemaObject schemaObject : all) {
            db.update(session, schemaObject);
        }
        return 0;
    }

}
View Full Code Here

        // need to use the system session, so that the update
        // can be committed immediately - not committing it
        // would keep other transactions from using the sequence
        Session sysSession = db.getSystemSession();
        synchronized (sysSession) {
            db.update(sysSession, sequence);
            sysSession.commit(true);
        }
        return 0;
    }
View Full Code Here

        } else {
            object.setComment(text);
        }
        if (column || objectType == DbObject.TABLE_OR_VIEW || objectType == DbObject.USER
                || objectType == DbObject.INDEX || objectType == DbObject.CONSTRAINT) {
            db.update(session, object);
        } else {
            Comment comment = db.findComment(object);
            if (comment == null) {
                if (text == null) {
                    // reset a non-existing comment - nothing to do
View Full Code Here

            } else {
                if (text == null) {
                    db.removeDatabaseObject(session, comment);
                } else {
                    comment.setCommentText(text);
                    db.update(session, comment);
                }
            }
        }
        return 0;
    }
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.