diff options
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo')
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java | 10 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java index f9bac1f..39d5a5a 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java @@ -649,7 +649,9 @@ class JDBCStorage<S extends Storable> extends StandardQueryFactory<S> }
@Override
- public Cursor<S> fetch(FilterValues<S> values, long from, Long to) throws FetchException {
+ public Cursor<S> fetchSlice(FilterValues<S> values, long from, Long to)
+ throws FetchException
+ {
if (to != null && (to - from) <= 0) {
return EmptyCursor.the();
}
@@ -660,17 +662,17 @@ class JDBCStorage<S extends Storable> extends StandardQueryFactory<S> switch (option) {
case NOT_SUPPORTED: default:
- return super.fetch(values, from, to);
+ return super.fetchSlice(values, from, to);
case LIMIT_ONLY:
if (from > 0 || to == null) {
- return super.fetch(values, from, to);
+ return super.fetchSlice(values, from, to);
}
select = prepareSelect(values, false);
select = mSupportStrategy.buildSelectWithSlice(select, false, true);
break;
case OFFSET_ONLY:
if (from <= 0) {
- return super.fetch(values, from, to);
+ return super.fetchSlice(values, from, to);
}
select = prepareSelect(values, false);
select = mSupportStrategy.buildSelectWithSlice(select, true, false);
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 e737288..6d07801 100644 --- a/src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java +++ b/src/main/java/com/amazon/carbonado/repo/logging/LoggingQuery.java @@ -141,13 +141,13 @@ class LoggingQuery<S extends Storable> implements Query<S> { return mQuery.fetch();
}
- public Cursor<S> fetch(long from, Long to) throws FetchException {
+ public Cursor<S> fetchSlice(long from, Long to) throws FetchException {
Log log = mStorage.mLog;
if (log.isEnabled()) {
- log.write("Query.fetch(start, to) on " + this +
+ log.write("Query.fetchSlice(start, to) on " + this +
", from: " + from + ", to: " + to);
}
- return mQuery.fetch(from, to);
+ return mQuery.fetchSlice(from, to);
}
public Cursor<S> fetchAfter(S start) throws FetchException {
|