From bddf5aea31f3ed34b43d26133de1671b2acbcc46 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Wed, 27 Sep 2006 23:51:49 +0000 Subject: Add support for faster full count. --- src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/java/com/amazon/carbonado/repo') 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 implements Storage, StorageAccess return new MergeSortBuffer(mRootStorage); } + public long countAll() throws FetchException { + return mMasterStorage.query().count(); + } + public Cursor fetchAll() throws FetchException { return mMasterStorage.query().fetch(); } -- cgit v1.2.3