diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2008-04-14 03:18:32 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2008-04-14 03:18:32 +0000 |
commit | 63ff050e4d48f8b997905e9e0a11d944ea6038a6 (patch) | |
tree | 64bcea8ed7fcbb56cc6cdd438bfff79a5615f203 /src/main/java/com/amazon/carbonado/repo/logging | |
parent | f6cce60bed5b4d49831058f24c9f46de7a2b0265 (diff) |
Support query fetch limits.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/logging')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java b/src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java index d1f21ce..56e4e33 100644 --- a/src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java +++ b/src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java @@ -137,6 +137,15 @@ class LoggingQuery<S extends Storable> implements Query<S> { return mQuery.fetch();
}
+ public Cursor<S> fetch(long from, Long to) throws FetchException {
+ Log log = mStorage.mLog;
+ if (log.isEnabled()) {
+ log.write("Query.fetch(start, to) on " + this +
+ ", from: " + from + ", to: " + to);
+ }
+ return mQuery.fetch(from, to);
+ }
+
public Cursor<S> fetchAfter(S start) throws FetchException {
Log log = mStorage.mLog;
if (log.isEnabled()) {
@@ -145,6 +154,15 @@ class LoggingQuery<S extends Storable> implements Query<S> { return mQuery.fetchAfter(start);
}
+ public Cursor<S> fetchAfter(S start, long from, Long to) throws FetchException {
+ Log log = mStorage.mLog;
+ if (log.isEnabled()) {
+ log.write("Query.fetchAfter(start, from, to) on " + this + ", start: " + start +
+ ", from: " + from + ", to: " + to);
+ }
+ return mQuery.fetchAfter(start);
+ }
+
public S loadOne() throws FetchException {
Log log = mStorage.mLog;
if (log.isEnabled()) {
|