From 63ff050e4d48f8b997905e9e0a11d944ea6038a6 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Mon, 14 Apr 2008 03:18:32 +0000 Subject: Support query fetch limits. --- .../amazon/carbonado/repo/logging/LoggingQuery.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/main/java/com/amazon/carbonado/repo/logging') 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 implements Query { return mQuery.fetch(); } + public Cursor 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 fetchAfter(S start) throws FetchException { Log log = mStorage.mLog; if (log.isEnabled()) { @@ -145,6 +154,15 @@ class LoggingQuery implements Query { return mQuery.fetchAfter(start); } + public Cursor 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()) { -- cgit v1.2.3