| |
|
| java.lang.Object org.continuent.sequoia.controller.requests.AbstractRequest org.continuent.sequoia.controller.requests.SelectRequest
All known Subclasses: org.continuent.sequoia.controller.requests.UnknownReadRequest,
SelectRequest | public class SelectRequest extends AbstractRequest implements Serializable(Code) | | A SelectRequest is an SQL request returning a
java.sql.ResultSet . It may also have database side-effects.
It has the following syntax:
SELECT [ALL|DISTINCT] select-item[,select-item]*
FROM table-specification[,table-specification]*
[WHERE search-condition]
[GROUP BY grouping-column[,grouping-column]]
[HAVING search-condition]
[ORDER BY sort-specification[,sort-specification]]
[LIMIT ignored]
Note that table-specification in the FROM clause can be a
sub-select. Everything after the end of the WHERE clause is
ignored.
author: Emmanuel Cecchet author: Julie Marguerite author: Mathieu Peltier author: Sara Bouchenak version: 1.0 |
Constructor Summary | |
public | SelectRequest(String sqlQuery, boolean escapeProcessing, int timeout, String lineSeparator) Creates a new SelectRequest instance. | protected | SelectRequest(String sqlQuery, boolean escapeProcessing, int timeout, String lineSeparator, int type) |
AVERAGE_FUNCTION | final public static int AVERAGE_FUNCTION(Code) | | Represents a SQL average() macro
|
COUNT_FUNCTION | final public static int COUNT_FUNCTION(Code) | | Represents a SQL count() macro
|
MAX_FUNCTION | final public static int MAX_FUNCTION(Code) | | Represents a SQL max() macro
|
MIN_FUNCTION | final public static int MIN_FUNCTION(Code) | | Represents a SQL min() macro
|
NO_FUNCTION | final public static int NO_FUNCTION(Code) | | Some values to keep track of function in the SELECT request
|
SUM_FUNCTION | final public static int SUM_FUNCTION(Code) | | Represents a SQL sum() macro
|
aliasFrom | protected transient Collection aliasFrom(Code) | | ArrayList of AliasedTable objects
|
funcType | public transient int funcType(Code) | | Need to keep track of type of query, e.g. MAX, COUNT, etc.
|
order | protected transient ArrayList order(Code) | | ArrayList of OrderBy objects
|
pkValue | protected transient String pkValue(Code) | | Primary key value in case of a unique selection
|
select | protected transient ArrayList select(Code) | | ArrayList of TableColumn objects.
|
where | protected transient ArrayList where(Code) | | ArrayList of TableColumn objects.
|
SelectRequest | public SelectRequest(String sqlQuery, boolean escapeProcessing, int timeout, String lineSeparator)(Code) | | Creates a new SelectRequest instance. The caller must give
an SQL request, without any leading or trailing spaces and beginning with
the 'select' keyword (it will not be checked).
The request is not parsed but it can be done later by a call to
SelectRequest.parse(DatabaseSchema,int,boolean) .
Parameters: sqlQuery - the SQL query Parameters: escapeProcessing - should the driver to escape processing beforesending to the database ? Parameters: timeout - an int value Parameters: lineSeparator - the line separator used in the query See Also: SelectRequest.parse |
debug | public void debug()(Code) | | Displays some debugging information about this request.
|
getAliasedFrom | public Collection getAliasedFrom()(Code) | | Returns a Collection of AliasedDatabaseTable
objects representing the table names found in the FROM
clause of this request.
a Collection of AliasedDatabaseTable |
getFrom | public Collection getFrom()(Code) | | Returns a Collection of String objects
representing the table names found in the FROM clause of
this request.
a Collection of String |
getOrderBy | public ArrayList getOrderBy()(Code) | | Returns an ArrayList of OrderBy objects
representing the columns involved in the ORDER BY clause of
this request.
an ArrayList of OrderBy |
getPkValue | public String getPkValue()(Code) | | Returns the pkValue. |
getSelect | public ArrayList getSelect()(Code) | | Returns an ArrayList of DatabaseColumn
objects representing the columns selected in the SELECT
clause of this request.
an ArrayList of TableColumn |
getWhere | public ArrayList getWhere()(Code) | | Returns an ArrayList of TableColumn objects
representing the columns involved in the WHERE clause of
this request.
an ArrayList of TableColumn |
getWhereValues | public Hashtable getWhereValues()(Code) | | Returns an Hashtable of String keys
representing unique column names and String values
associated with the columns involved in this request.
an Hashtable value |
isMustBroadcast | public boolean isMustBroadcast()(Code) | | Returns the mustBroadcast value.
Returns the mustBroadcast. |
returnsResultSet | public boolean returnsResultSet()(Code) | | Does this request returns a ResultSet?
false |
setMustBroadcast | public void setMustBroadcast(boolean mustBroadcast)(Code) | | Sets the mustBroadcast value.
Parameters: mustBroadcast - The mustBroadcast to set. |
setPkValue | public void setPkValue(String pkValue)(Code) | | Parameters: pkValue - The pkValue to set. |
|
|
|