From 1e81bfc705cafe88b804a8a6b1b8616c8773d280 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sun, 14 Oct 2007 05:44:35 +0000 Subject: Support ordering by derived properties. --- .../com/amazon/carbonado/qe/FilteredQueryExecutor.java | 10 ++++++++++ .../java/com/amazon/carbonado/qe/SortedQueryExecutor.java | 10 ++++++++++ .../java/com/amazon/carbonado/qe/UnionQueryExecutor.java | 14 ++++++++++++++ 3 files changed, 34 insertions(+) (limited to 'src/main/java/com/amazon/carbonado/qe') diff --git a/src/main/java/com/amazon/carbonado/qe/FilteredQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/FilteredQueryExecutor.java index 494d353..6f662a4 100644 --- a/src/main/java/com/amazon/carbonado/qe/FilteredQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/FilteredQueryExecutor.java @@ -75,6 +75,16 @@ public class FilteredQueryExecutor extends AbstractQueryExec return mExecutor.getOrdering(); } + /** + * Prints native query of the wrapped executor. + */ + @Override + public boolean printNative(Appendable app, int indentLevel, FilterValues values) + throws IOException + { + return mExecutor.printNative(app, indentLevel, values); + } + public boolean printPlan(Appendable app, int indentLevel, FilterValues values) throws IOException { diff --git a/src/main/java/com/amazon/carbonado/qe/SortedQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/SortedQueryExecutor.java index a142b72..5419fe6 100644 --- a/src/main/java/com/amazon/carbonado/qe/SortedQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/SortedQueryExecutor.java @@ -115,6 +115,16 @@ public class SortedQueryExecutor extends AbstractQueryExecut return mHandledOrdering.concat(mRemainderOrdering); } + /** + * Prints native query of the wrapped executor. + */ + @Override + public boolean printNative(Appendable app, int indentLevel, FilterValues values) + throws IOException + { + return mExecutor.printNative(app, indentLevel, values); + } + public boolean printPlan(Appendable app, int indentLevel, FilterValues values) throws IOException { diff --git a/src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java b/src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java index aa3577f..c73952c 100644 --- a/src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java +++ b/src/main/java/com/amazon/carbonado/qe/UnionQueryExecutor.java @@ -122,6 +122,20 @@ public class UnionQueryExecutor extends AbstractQueryExecuto return mTotalOrdering; } + /** + * Prints native queries of the wrapped executors. + */ + @Override + public boolean printNative(Appendable app, int indentLevel, FilterValues values) + throws IOException + { + boolean result = false; + for (QueryExecutor executor : mExecutors) { + result |= executor.printNative(app, indentLevel, values); + } + return result; + } + public boolean printPlan(Appendable app, int indentLevel, FilterValues values) throws IOException { -- cgit v1.2.3