net.sf.saffron.ext
Class JdbcTable
java.lang.Object
|
+--net.sf.saffron.ext.AbstractTable
|
+--net.sf.saffron.ext.JdbcTable
- All Implemented Interfaces:
- ImplementableTable, SaffronTable
- public class JdbcTable
- extends AbstractTable
- implements ImplementableTable
A JdbcTable
implements SaffronTable
by connecting to a
JDBC database.
- Since:
- 10 November, 2001
- Version:
- $Id: //open/saffron/src/net/sf/saffron/ext/JdbcTable.java#3 $
- Author:
- jhyde
Nested Class Summary |
static class |
JdbcTable.JdbcColumn
JdbcColumn records the mapping of fields onto columns, for
the purposes of SQL generation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
columns
JdbcTable.JdbcColumn[] columns
JdbcTable
public JdbcTable(SaffronSchema schema,
String name,
SaffronType rowType,
JdbcTable.JdbcColumn[] columns)
JdbcTable
public JdbcTable(SaffronSchema schema,
String name,
SaffronType rowType)
getColumn
public JdbcTable.JdbcColumn getColumn(String fieldName)
- Returns the column that the named field maps to.
implement
public void implement(SaffronRel rel,
RelImplementor implementor)
- Specified by:
implement
in interface ImplementableTable
toRel
public SaffronRel toRel(VolcanoCluster cluster,
SaffronConnection connection)
- Description copied from interface:
SaffronTable
- Converts this table into a
relational expression
.
The planner
calls this
method to convert a table into an initial relational expression,
generally something abstract, such as a
TableAccessRel
, then optimizes this expression
by applying rules
to transform it
into more efficient access methods for this table.
- Specified by:
toRel
in interface SaffronTable
- Parameters:
cluster
- the cluster the relational expression will belong toconnection
- the parse tree of the expression which evaluates
to a connection object