summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2006-09-27 23:51:49 +0000
committerBrian S. O'Neill <bronee@gmail.com>2006-09-27 23:51:49 +0000
commitbddf5aea31f3ed34b43d26133de1671b2acbcc46 (patch)
treee8d3f9f92dc66e395550e0158cec8208c05c6cf0 /src/main/java/com/amazon/carbonado/repo
parent3d1c317bf2d063bbff597f2c05e3a9749e448dd4 (diff)
Add support for faster full count.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java
index 1fa1244..2901ea0 100644
--- a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java
+++ b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java
@@ -297,6 +297,10 @@ class IndexedStorage<S extends Storable> implements Storage<S>, StorageAccess<S>
return new MergeSortBuffer<S>(mRootStorage);
}
+ public long countAll() throws FetchException {
+ return mMasterStorage.query().count();
+ }
+
public Cursor<S> fetchAll() throws FetchException {
return mMasterStorage.query().fetch();
}