public Object getValue(int field) throws SqlJetException { return cursor.getValue(field); }
public Object getValue(String fieldName) throws SqlJetException { return cursor.getValue(fieldName); }
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); }
(!cursor.getValue(ACTUAL_NODE__Fields.changelist.toString()).equals(newValues.get(ACTUAL_NODE__Fields.changelist.toString()) ) || (newValues.get(ACTUAL_NODE__Fields.changelist.toString()) == null))) rowValues.put(CHANGELIST_LIST__Fields.wc_id.toString(), cursor.getValue(ACTUAL_NODE__Fields.wc_id.toString())); rowValues.put(CHANGELIST_LIST__Fields.local_relpath.toString(), cursor.getValue(ACTUAL_NODE__Fields.local_relpath.toString())); rowValues.put(CHANGELIST_LIST__Fields.notify.toString(), 27); rowValues.put(CHANGELIST_LIST__Fields.changelist.toString(), cursor.getValue(ACTUAL_NODE__Fields.changelist.toString())); || !cursor.getValue(ACTUAL_NODE__Fields.changelist.toString()).equals(newValues.get(ACTUAL_NODE__Fields.changelist.toString()) ) ))
protected Object getColumn(String f) throws SVNException { try { if (getCursor() == null || getCursor().eof()) return null; return getCursor().getValue(f); } catch (SqlJetException e) { SVNSqlJetDb.createSqlJetError(e); return null; } }
public Map<String, Object> getRowValues() throws SVNException { final HashMap<String, Object> v = new HashMap<String, Object>(); try { final List<ISqlJetColumnDef> columns = getTable().getDefinition().getColumns(); for (ISqlJetColumnDef column : columns) { final String colName = column.getName(); final SqlJetValueType fieldType = getCursor().getFieldType(colName); if (fieldType == SqlJetValueType.NULL) { v.put(colName, null); } else if (fieldType == SqlJetValueType.BLOB) { v.put(colName, getCursor().getBlobAsArray(colName)); } else { v.put(colName, getCursor().getValue(colName)); } } return v; } catch (SqlJetException e) { SVNSqlJetDb.createSqlJetError(e); return null; } }
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 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); }
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 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); }