MCPcopy Create free account
hub / github.com/apple/foundationdb / getColumn

Method getColumn

recipes/java-recipes/MicroTable.java:129–144  ·  view source on GitHub ↗
(TransactionContext tcx,
												final String column)

Source from the content-addressed store, hash-verified

127
128
129 public static TreeMap<String,Object> getColumn(TransactionContext tcx,
130 final String column){
131 return tcx.run(new Function<Transaction,TreeMap<String,Object> >() {
132 public TreeMap<String,Object> apply(Transaction tr){
133 TreeMap<String,Object> rows = new TreeMap<String,Object>();
134
135 for(KeyValue kv : tr.getRange(
136 colIndex.subspace(Tuple.from(column)).range())){
137 rows.put(colIndex.unpack(kv.getKey()).getString(1),
138 unpack(kv.getValue()));
139 }
140
141 return rows;
142 }
143 });
144 }
145
146 public static void clearSubspace(TransactionContext tcx, final Subspace s){
147 tcx.run(new Function<Transaction,Void>() {

Callers 1

smokeTestMethod · 0.95

Calls 1

runMethod · 0.65

Tested by

no test coverage detected