public SqlJetValueType getColumnType(int columnIndex) throws SqlJetException { if (result instanceof String) { return SqlJetValueType.TEXT; } if (result instanceof Integer) { return SqlJetValueType.INTEGER; } if (result instanceof Double) { return SqlJetValueType.FLOAT; } return cursor.getFieldType(columnIndex); }
public SqlJetValueType getFieldType(int field) throws SqlJetException { return cursor.getFieldType(field); }
public SqlJetValueType getFieldType(String fieldName) throws SqlJetException { return cursor.getFieldType(fieldName); }
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; } }