(Transaction tr)
| 153 | public static Object insertDoc(TransactionContext tcx, final Map<Object,Object> doc){ |
| 154 | return tcx.run(new Function<Transaction,Object>() { |
| 155 | public Object apply(Transaction tr){ |
| 156 | if(!doc.containsKey("doc_id")){ |
| 157 | doc.put("doc_id", getNewID(tr)); |
| 158 | } |
| 159 | for(Tuple t : toTuples(doc)){ |
| 160 | tr.set(docSpace.pack(Tuple.from(doc.get("doc_id")).addAll(t.popBack())), |
| 161 | Tuple.from(t.get(t.size() - 1)).pack()); |
| 162 | } |
| 163 | return doc.get("doc_id"); |
| 164 | } |
| 165 | }); |
| 166 | } |
| 167 |
nothing calls this directly
no test coverage detected