session.persistIndex(cf, indColFamily, rowKey, col);
}
@Override
public void remove(String colFamily, TypedRow row) {
DboTableMeta metaDbo = cachedMeta.getMeta(colFamily);
if(metaDbo == null)
throw new IllegalArgumentException("DboTableMeta for colFamily="+colFamily+" was not found");
TypedRow proxy = row;
Object rowKey = row.getRowKey();
DboColumnIdMeta idMeta = metaDbo.getIdColumnMeta();
byte[] byteKey = idMeta.convertToStorage2(rowKey);
byte[] virtualKey = idMeta.formVirtRowKey(byteKey);
if(!metaDbo.hasIndexedField()) {
session.remove(metaDbo, virtualKey);
return;
} else if(!(row instanceof NoSqlTypedRowProxy)) {
//then we don't have the database information for indexes so we need to read from the database
proxy = find(metaDbo.getColumnFamily(), rowKey);
}
List<IndexData> indexToRemove = metaDbo.findIndexRemoves((NoSqlTypedRowProxy)proxy, byteKey);
//REMOVE EVERYTHING HERE, we are probably removing extra and could optimize this later
for(IndexData ind : indexToRemove) {
session.removeFromIndex(metaDbo, ind.getColumnFamilyName(), ind.getRowKeyBytes(), ind.getIndexColumn());
}