Package com.j_spaces.jdbc.executor
Interface IQueryExecutor
- All Superinterfaces:
Externalizable,Serializable
- All Known Implementing Classes:
AbstractQueryExecutor,CollocatedJoinedQueryExecutor,JoinedQueryExecutor,QueryExecutor
- Since:
- 7.0
- Author:
- anna
-
Method Summary
Modifier and TypeMethodDescriptionaggregate(IQueryResultSet<IEntryPacket> entries) Execute SQL function that processes the result entries and calculates one value - sum,average,min,maxintclear(QueryTemplatePacket template, ISpaceProxy space, Transaction txn, int modifier) Execute clearConverts the list of ExternaEntries to 2 dimensional array that contains the values of the entries.intcount(QueryTemplatePacket template, ISpaceProxy space, Transaction txn, int readModifier) execute(ISpaceProxy space, Transaction txn, int modifiers, int max) voidexecute(AndNode exp, ISpaceProxy space, Transaction txn, int readModifier, int max) Execute And expression - execute both children and union the resultsvoidexecute(ExpNode equalNode, ISpaceProxy space, Transaction txn, int readModifier, int max) voidexecute(InnerQueryNode innerQueryNode, ISpaceProxy space, Transaction txn, int readModifier, int max) Execute inner queryvoidexecute(InNode exp, ISpaceProxy space, Transaction txn, int readModifier, int max) Execute IN expression - can be a list of simple values or an inner select queryvoidexecute(NotInNode exp, ISpaceProxy space, Transaction txn, int readModifier, int max) execute NOT IN queryvoidexecute(OrNode exp, ISpaceProxy space, Transaction txn, int readModifier, int max) Execute Or expression - execute both children and union the resultsfilterDistinctEntries(IQueryResultSet<IEntryPacket> entries) Removes duplicate entries from the result set.groupBy(IQueryResultSet<IEntryPacket> entries, List<SelectColumn> groupColumns) Group the results according to the group by clausevoidorderBy(IQueryResultSet<IEntryPacket> entries, List<OrderColumn> orderColumns) Order the results according to the order by clausereadAll(ISpaceProxy space, Transaction txn) Methods inherited from interface java.io.Externalizable
readExternal, writeExternal
-
Method Details
-
execute
void execute(OrNode exp, ISpaceProxy space, Transaction txn, int readModifier, int max) throws SQLException Execute Or expression - execute both children and union the results- Throws:
SQLException
-
execute
void execute(AndNode exp, ISpaceProxy space, Transaction txn, int readModifier, int max) throws SQLException Execute And expression - execute both children and union the results- Throws:
SQLException
-
execute
void execute(InNode exp, ISpaceProxy space, Transaction txn, int readModifier, int max) throws SQLException Execute IN expression - can be a list of simple values or an inner select query- Throws:
SQLException
-
execute
void execute(NotInNode exp, ISpaceProxy space, Transaction txn, int readModifier, int max) throws SQLException execute NOT IN query- Throws:
SQLException
-
execute
void execute(InnerQueryNode innerQueryNode, ISpaceProxy space, Transaction txn, int readModifier, int max) throws SQLException Execute inner query- Throws:
SQLException
-
execute
IQueryResultSet<IEntryPacket> execute(ISpaceProxy space, Transaction txn, int modifiers, int max) throws SQLException - Throws:
SQLException
-
execute
void execute(ExpNode equalNode, ISpaceProxy space, Transaction txn, int readModifier, int max) throws SQLException - Parameters:
equalNode-space-txn-readModifier-max-- Throws:
SQLException
-
clear
int clear(QueryTemplatePacket template, ISpaceProxy space, Transaction txn, int modifier) throws RemoteException, TransactionException, UnusableEntryException Execute clear- Returns:
- int
- Throws:
RemoteExceptionTransactionExceptionUnusableEntryException
-
count
int count(QueryTemplatePacket template, ISpaceProxy space, Transaction txn, int readModifier) throws SQLException - Throws:
SQLException
-
readAll
- Throws:
SQLException
-
groupBy
IQueryResultSet<IEntryPacket> groupBy(IQueryResultSet<IEntryPacket> entries, List<SelectColumn> groupColumns) throws SQLException Group the results according to the group by clause- Returns:
- the results according to the group by clause
- Throws:
SQLException
-
orderBy
void orderBy(IQueryResultSet<IEntryPacket> entries, List<OrderColumn> orderColumns) throws SQLException Order the results according to the order by clause- Throws:
SQLException
-
aggregate
Execute SQL function that processes the result entries and calculates one value - sum,average,min,max- Returns:
- the result entries one value - sum,average,min,max
- Throws:
SQLException
-
filterDistinctEntries
Removes duplicate entries from the result set. The rows are inserted into a TreeSet and only the rows that were successfully added, are considered distinct. Note: TreeSet is used and not HashSet to avoid creating hashCode for all fields.- Returns:
- new IQueryResultSet with distinct entries
-
convertEntriesToResultArrays
Converts the list of ExternaEntries to 2 dimensional array that contains the values of the entries. Each row matches specific IEntryPacket. The conversion is necessary for entries ordering.
-