From 2fd7b3fd77c8141f7fb21d2bd86eb839fa55ef6f Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Fri, 13 Oct 2006 21:09:10 +0000 Subject: Pass the internal query executor along when "with" is called, as an optimization. --- .../java/com/amazon/carbonado/repo/toy/ToyStorage.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/test/java/com/amazon/carbonado') diff --git a/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java b/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java index bafa244..71a597d 100644 --- a/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java +++ b/src/test/java/com/amazon/carbonado/repo/toy/ToyStorage.java @@ -94,7 +94,7 @@ public class ToyStorage } public Query query() { - return new ToyQuery(null, null); + return new ToyQuery(null, null, null); } public Query query(String filter) { @@ -102,11 +102,11 @@ public class ToyStorage } public Query query(Filter filter) { - return new ToyQuery(filter.initialFilterValues(), null); + return new ToyQuery(filter.initialFilterValues(), null, null); } public Query query(FilterValues values, OrderingList ordering) { - return new ToyQuery(values, ordering); + return new ToyQuery(values, ordering, null); } public QueryExecutor executor(Filter filter, OrderingList ordering) { @@ -239,8 +239,8 @@ public class ToyStorage } private class ToyQuery extends StandardQuery { - ToyQuery(FilterValues values, OrderingList ordering) { - super(values, ordering); + ToyQuery(FilterValues values, OrderingList ordering, QueryExecutor executor) { + super(values, ordering, executor); } protected Transaction enterTransaction(IsolationLevel level) { @@ -255,8 +255,11 @@ public class ToyStorage return ToyStorage.this; } - protected StandardQuery newInstance(FilterValues values, OrderingList ordering) { - return new ToyQuery(values, ordering); + protected StandardQuery newInstance(FilterValues values, + OrderingList ordering, + QueryExecutor executor) + { + return new ToyQuery(values, ordering, executor); } } } -- cgit v1.2.3