public byte[] getBlobAsArray(String fieldName) throws SqlJetException { return cursor.getBlobAsArray(fieldName); }
public byte[] getBlobAsArray(int field) throws SqlJetException { return cursor.getBlobAsArray(field); }
public byte[] getBlobAsArray(int columnIndex) throws SqlJetException { return cursor.getBlobAsArray(columnIndex); }
protected byte[] getColumnBlob(String f) throws SVNException { try { if (getCursor() == null || getCursor().eof()) return null; return getCursor().getBlobAsArray(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(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); }
byte[] transactionId = cursor.getBlobAsArray(TRANSACTION_COLUMN); byte phase = (byte) cursor.getInteger(PHASE_COLUMN); byte exceptionType = (byte) cursor.getInteger(EXCEPTION_COLUMN); byte[] transactionId = cursor.getBlobAsArray(TRANSACTION_COLUMN); byte phase = (byte) cursor.getInteger(PHASE_COLUMN); DurabilityEvent event = SQLiteStateManager.this.listener.createEvent(transactionId, phase); byte[] result = cursor.getBlobAsArray(RESULT_COLUMN); invokerEvent.setResult(Objects.deserialize(result, InvokerResult.class));
private SVNSkel getConflictSkel(ISqlJetCursor cursor) throws SqlJetException, SVNException { String conflictOldRelPath = cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.conflict_old.name()); String conflictNewRelPath = cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.conflict_new.name()); String conflictWorkingRelPath = cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.conflict_working.name()); String propRejectRelPath = cursor.getString(SVNWCDbSchema.ACTUAL_NODE__Fields.prop_reject.name()); byte[] treeConflictData = cursor.getBlobAsArray(SVNWCDbSchema.ACTUAL_NODE__Fields.tree_conflict_data.name()); return SvnWcDbConflicts.convertToConflictSkel(conflictOldRelPath, conflictWorkingRelPath, conflictNewRelPath, propRejectRelPath, treeConflictData); } }
final String conflictNew = actulaNode.getString(ACTUAL_NODE__Fields.conflict_new.toString()); final String propReject = actulaNode.getString(ACTUAL_NODE__Fields.prop_reject.toString()); final byte[] treeConflictData = actulaNode.getBlobAsArray(ACTUAL_NODE__Fields.tree_conflict_data.toString());
if ("".equals(localRelPathStr) || rowRelPath.equals(localRelPathStr) || rowRelPath.startsWith(localRelPathStr + "/")) { matched = true; if (cursor.getBlobAsArray(SVNWCDbSchema.ACTUAL_NODE__Fields.properties.toString()) != null) { return true;