/** * @see #getTemporaryDatabase(boolean) * * @return SqlJetDb object for temporary database * @throws SqlJetException */ public SqlJetDb getTemporaryDatabase() throws SqlJetException { return getTemporaryDatabase(false); }
public void statementCompleted(SqlJetDb db, SqlJetException error) throws SqlJetException { if (error == null) { this.db.getDb().getTemporaryDatabase().commit(); } else { this.db.getDb().getTemporaryDatabase().rollback(); } }
public void statementCompleted(SqlJetDb db, SqlJetException error) throws SqlJetException { if (error == null) { this.db.getDb().getTemporaryDatabase().commit(); } else { this.db.getDb().getTemporaryDatabase().rollback(); } }
public void statementCompleted(SqlJetDb db, SqlJetException error) throws SqlJetException { if (error == null) { this.db.getDb().getTemporaryDatabase().commit(); } else { this.db.getDb().getTemporaryDatabase().rollback(); } }
public void statementCompleted(SqlJetDb db, SqlJetException error) throws SqlJetException { if (error == null) { this.db.getDb().getTemporaryDatabase().commit(); } else { this.db.getDb().getTemporaryDatabase().rollback(); } }
public void statementStarted(SqlJetDb db) throws SqlJetException { this.db.getDb().getTemporaryDatabase().beginTransaction(SqlJetTransactionMode.WRITE); }
public void statementStarted(SqlJetDb db) throws SqlJetException { this.db.getDb().getTemporaryDatabase().beginTransaction(SqlJetTransactionMode.WRITE); }
public void statementStarted(SqlJetDb db) throws SqlJetException { this.db.getDb().getTemporaryDatabase().beginTransaction(SqlJetTransactionMode.WRITE); }
public void statementStarted(SqlJetDb db) throws SqlJetException { this.db.getDb().getTemporaryDatabase().beginTransaction(SqlJetTransactionMode.WRITE); }
/** * DROP TRIGGER IF EXISTS trigger_changelist_list_actual_cl_insert; * CREATE TEMPORARY TRIGGER trigger_changelist_list_actual_cl_insert * BEFORE INSERT ON actual_node * BEGIN * INSERT INTO changelist_list(wc_id, local_relpath, notify, changelist) * VALUES (NEW.wc_id, NEW.local_relpath, 26, NEW.changelist); * END; */ public void beforeInsert(SqlJetConflictAction conflictAction, ISqlJetTable table, Map<String, Object> newValues) throws SqlJetException { ISqlJetTable clltable = db.getDb().getTemporaryDatabase().getTable(SVNWCDbSchema.CHANGELIST_LIST.toString()); Map<String, Object> rowValues = new HashMap<String, Object>(); rowValues.put(CHANGELIST_LIST__Fields.wc_id.toString(), newValues.get(ACTUAL_NODE__Fields.wc_id.toString())); rowValues.put(CHANGELIST_LIST__Fields.local_relpath.toString(), newValues.get(ACTUAL_NODE__Fields.local_relpath.toString())); rowValues.put(CHANGELIST_LIST__Fields.notify.toString(), 26); rowValues.put(CHANGELIST_LIST__Fields.changelist.toString(), newValues.get(ACTUAL_NODE__Fields.changelist.toString())); clltable.insertByFieldNames(rowValues); }
public SVNSqlJetDb getTemporaryDb() throws SVNException { if (temporaryDb == null) { try { temporaryDb = new SVNSqlJetDb(getDb().getTemporaryDatabase(temporaryDbInMemory), temporaryDbInMemory); } catch (SqlJetException e) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.SQLITE_ERROR, e); SVNErrorManager.error(err, SVNLogType.WC); return null; } } return temporaryDb; }
public void beforeDelete(ISqlJetCursor cursor) throws SqlJetException { ISqlJetTable table = db.getDb().getTemporaryDatabase().getTable(SVNWCDbSchema.REVERT_LIST.toString()); Map<String, Object> rowValues = new HashMap<String, Object>(); rowValues.put(REVERT_LIST__Fields.local_relpath.toString(), cursor.getValue(NODES__Fields.local_relpath.toString())); rowValues.put(REVERT_LIST__Fields.actual.toString(), 0); rowValues.put(REVERT_LIST__Fields.op_depth.toString(), cursor.getValue(NODES__Fields.op_depth.toString())); rowValues.put(REVERT_LIST__Fields.repos_id.toString(), cursor.getValue(NODES__Fields.repos_id.toString())); rowValues.put(REVERT_LIST__Fields.kind.toString(), cursor.getValue(NODES__Fields.kind.toString())); table.insertByFieldNamesOr(SqlJetConflictAction.REPLACE, rowValues); }
public void beforeUpdate(ISqlJetCursor cursor, Map<String, Object> newValues) throws SqlJetException { ISqlJetTable table = db.getDb().getTemporaryDatabase().getTable(SVNWCDbSchema.REVERT_LIST.toString()); Map<String, Object> rowValues = new HashMap<String, Object>(); rowValues.put(REVERT_LIST__Fields.local_relpath.toString(), cursor.getValue(ACTUAL_NODE__Fields.local_relpath.toString())); rowValues.put(REVERT_LIST__Fields.actual.toString(), 1); rowValues.put(REVERT_LIST__Fields.conflict_data.toString(), cursor.getBlobAsArray(ACTUAL_NODE__Fields.conflict_data.toString())); if (!cursor.isNull(ACTUAL_NODE__Fields.properties.toString()) || !cursor.isNull(ACTUAL_NODE__Fields.tree_conflict_data.toString())) { rowValues.put(REVERT_LIST__Fields.notify.toString(), 1); } else if (!exists(db.getDb().getTemporaryDatabase(), cursor.getInteger(ACTUAL_NODE__Fields.wc_id.toString()), cursor.getString(ACTUAL_NODE__Fields.local_relpath.toString()))) { rowValues.put(REVERT_LIST__Fields.notify.toString(), 1); } else { rowValues.put(REVERT_LIST__Fields.notify.toString(), null); } table.insertByFieldNamesOr(SqlJetConflictAction.REPLACE, rowValues); }
public void beforeUpdate(ISqlJetCursor cursor, Map<String, Object> newValues) throws SqlJetException { ISqlJetTable table = db.getDb().getTemporaryDatabase().getTable(SVNWCDbSchema.REVERT_LIST.toString()); Map<String, Object> rowValues = new HashMap<String, Object>(); rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.local_relpath.toString(), cursor.getValue(SVNWCDbSchema.ACTUAL_NODE__Fields.local_relpath.toString())); rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.actual.toString(), 1); rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.conflict_data.toString(), getConflictData(cursor)); if (!cursor.isNull(SVNWCDbSchema.ACTUAL_NODE__Fields.properties.toString()) || !cursor.isNull(SVNWCDbSchema.ACTUAL_NODE__Fields.tree_conflict_data.toString())) { rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), 1); } else if (!exists(db.getDb().getTemporaryDatabase(), cursor.getInteger(SVNWCDbSchema.ACTUAL_NODE__Fields.wc_id.toString()), cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.local_relpath.toString()))) { rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), 1); } else { rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), null); } table.insertByFieldNamesOr(SqlJetConflictAction.REPLACE, rowValues); }
public void beforeUpdate(ISqlJetCursor cursor, Map<String, Object> newValues) throws SqlJetException { ISqlJetTable table = db.getDb().getTemporaryDatabase().getTable(SVNWCDbSchema.CHANGELIST_LIST.toString());
public void beforeDelete(ISqlJetCursor cursor) throws SqlJetException { ISqlJetTable table = db.getDb().getTemporaryDatabase().getTable(SVNWCDbSchema.REVERT_LIST.toString()); Map<String, Object> rowValues = new HashMap<String, Object>(); rowValues.put(REVERT_LIST__Fields.local_relpath.toString(), cursor.getValue(ACTUAL_NODE__Fields.local_relpath.toString())); rowValues.put(REVERT_LIST__Fields.actual.toString(), 1); rowValues.put(REVERT_LIST__Fields.conflict_data.toString(), cursor.getBlobAsArray(ACTUAL_NODE__Fields.conflict_data.toString())); if (!cursor.isNull(ACTUAL_NODE__Fields.properties.toString()) || !cursor.isNull(ACTUAL_NODE__Fields.tree_conflict_data.toString())) { rowValues.put(REVERT_LIST__Fields.notify.toString(), 1); } else if (!exists(db.getDb(), cursor.getInteger(ACTUAL_NODE__Fields.wc_id.toString()), cursor.getString(ACTUAL_NODE__Fields.local_relpath.toString()))) { rowValues.put(REVERT_LIST__Fields.notify.toString(), 1); } else { rowValues.put(REVERT_LIST__Fields.notify.toString(), null); } table.insertByFieldNamesOr(SqlJetConflictAction.REPLACE, rowValues); }
public void beforeDelete(ISqlJetCursor cursor) throws SqlJetException { ISqlJetTable table = db.getDb().getTemporaryDatabase().getTable(SVNWCDbSchema.REVERT_LIST.toString()); Map<String, Object> rowValues = new HashMap<String, Object>(); rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.local_relpath.toString(), cursor.getValue(SVNWCDbSchema.ACTUAL_NODE__Fields.local_relpath.toString())); rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.actual.toString(), 1); rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.conflict_data.toString(), getConflictData(cursor)); if (!cursor.isNull(SVNWCDbSchema.ACTUAL_NODE__Fields.properties.toString()) || !cursor.isNull(SVNWCDbSchema.ACTUAL_NODE__Fields.tree_conflict_data.toString())) { rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), 1); } else if (!exists(db.getDb(), cursor.getInteger(SVNWCDbSchema.ACTUAL_NODE__Fields.wc_id.toString()), cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.local_relpath.toString()))) { rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), 1); } else { rowValues.put(SVNWCDbSchema.REVERT_LIST__Fields.notify.toString(), null); } table.insertByFieldNamesOr(SqlJetConflictAction.REPLACE, rowValues); }