0
如何使用Java中的TableAPI從Oracle NoSQL表中獲取所有行? 我可以通過主鍵值獲取記錄。例如:如何從Oracle NoSQL表中獲取所有行?
TableAPI tableH = kvstore.getTableAPI();
Table myTable = tableH.getTable("myTable");
PrimaryKey key = myTable.createPrimaryKey();
key.put("item", "Hat");
List<Row> myRows = null;
try {
myRows = tableH.multiGet(key, null, null);
} catch (ConsistencyException ce) {
} catch (RequestTimeoutException re) {
}
for (Row theRow: myRows) {
String itemType = theRow.get("item").asString().get();
}
System.out.println(itemType);
但我無法獲得主鍵值。