Quadcap Embeddable Database

com.quadcap.sql.SelectFromItem Class Reference

Inheritance diagram for com.quadcap.sql.SelectFromItem:

com.quadcap.sql.TableExpression Externalizable com.quadcap.sql.Expression List of all members.

Detailed Description

TableExpression permitting individual tables in the SELECT statement to be "renamed" via the AS clause.

This may be necessary for example, in cases where a table is joined to itself. The optional column names in the FROM clause can be used to rename columns; this renaming doesn't affect the names of the columns in the final result set, but rather may be used to disambiguate column names in the WHERE clause.

Author:
Stan Bailes

Definition at line 64 of file SelectFromItem.java.

Public Member Functions

 SelectFromItem ()
 SelectFromItem (TableExpression e, String asName, Vector columns)
void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
void writeExternal (ObjectOutput out) throws IOException
int rank ()
 Returns zero if this is a scalar expression, one if it's a vector type and 2 if it's a table/cursor type.

boolean isUpdatable ()
 Is this table expression updatable?

void getBaseTables (Vector v)
 Return a vector consisting of the names of the underlying base tables that are used to derive this table expression.

void setWhere (Expression where)
 Set the WHERE clause associated with this table expression.

Cursor getCursor (Session session, Cursor outer) throws SQLException
 Return a cursor which can be used to access this table expression.

String toString ()
String name ()

Package Attributes

TableExpression e
String asName = null
Vector columns = null


Constructor & Destructor Documentation

com.quadcap.sql.SelectFromItem.SelectFromItem  ) 
 

Definition at line 69 of file SelectFromItem.java.

com.quadcap.sql.SelectFromItem.SelectFromItem TableExpression  e,
String  asName,
Vector  columns
 

Definition at line 71 of file SelectFromItem.java.


Member Function Documentation

void com.quadcap.sql.SelectFromItem.getBaseTables Vector  v  )  [virtual]
 

Return a vector consisting of the names of the underlying base tables that are used to derive this table expression.

Implements com.quadcap.sql.TableExpression.

Definition at line 95 of file SelectFromItem.java.

References com.quadcap.sql.SelectFromItem.e, com.quadcap.sql.TableExpression.getBaseTables(), and com.quadcap.sql.SelectFromItem.getBaseTables().

Referenced by com.quadcap.sql.SelectFromItem.getBaseTables().

Cursor com.quadcap.sql.SelectFromItem.getCursor Session  session,
Cursor  outer
throws SQLException [virtual]
 

Return a cursor which can be used to access this table expression.

Implements com.quadcap.sql.TableExpression.

Definition at line 104 of file SelectFromItem.java.

References com.quadcap.sql.SelectFromItem.asName, com.quadcap.sql.SelectFromItem.columns, com.quadcap.sql.SelectFromItem.e, com.quadcap.sql.TableExpression.getCursor(), and com.quadcap.sql.SelectFromItem.getCursor().

Referenced by com.quadcap.sql.SelectFromItem.getCursor().

boolean com.quadcap.sql.SelectFromItem.isUpdatable  )  [virtual]
 

Is this table expression updatable?

Implements com.quadcap.sql.TableExpression.

Definition at line 93 of file SelectFromItem.java.

References com.quadcap.sql.SelectFromItem.e, and com.quadcap.sql.TableExpression.isUpdatable().

String com.quadcap.sql.SelectFromItem.name  )  [virtual]
 

Implements com.quadcap.sql.TableExpression.

Definition at line 129 of file SelectFromItem.java.

References com.quadcap.sql.SelectFromItem.asName, com.quadcap.sql.SelectFromItem.e, and com.quadcap.sql.TableExpression.name().

int com.quadcap.sql.SelectFromItem.rank  )  [virtual]
 

Returns zero if this is a scalar expression, one if it's a vector type and 2 if it's a table/cursor type.

Implements com.quadcap.sql.TableExpression.

Definition at line 91 of file SelectFromItem.java.

References com.quadcap.sql.SelectFromItem.e, and com.quadcap.sql.TableExpression.rank().

void com.quadcap.sql.SelectFromItem.readExternal ObjectInput  in  )  throws IOException, ClassNotFoundException
 

Definition at line 77 of file SelectFromItem.java.

References com.quadcap.sql.SelectFromItem.readExternal().

Referenced by com.quadcap.sql.SelectFromItem.readExternal().

void com.quadcap.sql.SelectFromItem.setWhere Expression  where  ) 
 

Set the WHERE clause associated with this table expression.

Reimplemented from com.quadcap.sql.TableExpression.

Definition at line 99 of file SelectFromItem.java.

References com.quadcap.sql.SelectFromItem.e, com.quadcap.sql.TableExpression.setWhere(), and com.quadcap.sql.SelectFromItem.setWhere().

Referenced by com.quadcap.sql.SelectFromItem.setWhere().

String com.quadcap.sql.SelectFromItem.toString  )  [virtual]
 

Implements com.quadcap.sql.Expression.

Definition at line 111 of file SelectFromItem.java.

References com.quadcap.sql.SelectFromItem.asName, com.quadcap.sql.SelectFromItem.columns, com.quadcap.sql.SelectFromItem.e, and com.quadcap.sql.Expression.toString().

void com.quadcap.sql.SelectFromItem.writeExternal ObjectOutput  out  )  throws IOException
 

Definition at line 85 of file SelectFromItem.java.

References com.quadcap.sql.SelectFromItem.asName, com.quadcap.sql.SelectFromItem.columns, com.quadcap.sql.SelectFromItem.e, and com.quadcap.sql.SelectFromItem.writeExternal().

Referenced by com.quadcap.sql.SelectFromItem.writeExternal().


Member Data Documentation

String com.quadcap.sql.SelectFromItem.asName = null [package]
 

Definition at line 66 of file SelectFromItem.java.

Referenced by com.quadcap.sql.SelectFromItem.getCursor(), com.quadcap.sql.SelectFromItem.name(), com.quadcap.sql.SelectFromItem.toString(), and com.quadcap.sql.SelectFromItem.writeExternal().

Vector com.quadcap.sql.SelectFromItem.columns = null [package]
 

Definition at line 67 of file SelectFromItem.java.

Referenced by com.quadcap.sql.SelectFromItem.getCursor(), com.quadcap.sql.SelectFromItem.toString(), and com.quadcap.sql.SelectFromItem.writeExternal().

TableExpression com.quadcap.sql.SelectFromItem.e [package]
 

Definition at line 65 of file SelectFromItem.java.

Referenced by com.quadcap.sql.SelectFromItem.getBaseTables(), com.quadcap.sql.SelectFromItem.getCursor(), com.quadcap.sql.SelectFromItem.isUpdatable(), com.quadcap.sql.SelectFromItem.name(), com.quadcap.sql.SelectFromItem.rank(), com.quadcap.sql.SelectFromItem.setWhere(), com.quadcap.sql.SelectFromItem.toString(), and com.quadcap.sql.SelectFromItem.writeExternal().