Class Hierarchy Index
Class COM.cloudscape.vti.ExternalQuery
java.lang.Object
|
+----COM.cloudscape.vti.VTITemplate
|
+----COM.cloudscape.vti.ExternalQuery
- public class ExternalQuery
- extends VTITemplate
Copyright © 1998-1999 Cloudscape, Inc. All rights reserved.
Use of VirtualTableInterface to create an
ExternalVirtualTable from a JDBC query.
This class can be used in a FROM clause to get
query results from any JDBC source. For example:
SELECT city, state
FROM new ExternalQuery('jdbc:cloudscape:zipdb',
'SELECT city, state FROM ZipCodeMap WHERE zip=94612') AS Z
ExternalQuery objects can be used in joins, but since access
to ExternalVirtualTables is not optimized, their use in
performance sensitive queries must be hand-tuned.
Notes about this implementation:
This class implements only JDBC 1.2, not JDBC 2.0. You cannot
compile this class with JDK1.2, since it implements only the
JDBC 1.2 ResultSet interface and not the JDBC 2.0 ResultSet
interface. You can only use this class in a JDK 1.2 runtime
environment if no JDBC 2.0 calls are made against it.
-
ExternalQuery(String, String)
- Create a ResultSet based on a JDBC URL and a query.
-
clearWarnings()
-
-
close()
-
-
findColumn(String)
-
-
getAsciiStream(int)
-
-
getAsciiStream(String)
-
-
getBigDecimal(int, int)
-
-
getBigDecimal(String, int)
-
-
getBinaryStream(int)
-
-
getBinaryStream(String)
-
-
getBoolean(int)
-
-
getBoolean(String)
-
-
getByte(int)
-
-
getByte(String)
-
-
getBytes(int)
-
-
getBytes(String)
-
-
getCursorName()
-
-
getDate(int)
-
-
getDate(String)
-
-
getDouble(int)
-
-
getDouble(String)
-
-
getFloat(int)
-
-
getFloat(String)
-
-
getInt(int)
-
-
getInt(String)
-
-
getLong(int)
-
-
getLong(String)
-
-
getMetaData()
-
-
getObject(int)
-
-
getObject(String)
-
-
getResultSetMetaData(String, String)
- For the Virtual Table Interface, provide the metadata
for a given query.
-
getShort(int)
-
-
getShort(String)
-
-
getString(int)
-
-
getString(String)
-
-
getTime(int)
-
-
getTime(String)
-
-
getTimestamp(int)
-
-
getTimestamp(String)
-
-
getUnicodeStream(int)
-
-
getUnicodeStream(String)
-
-
getWarnings()
-
-
next()
-
-
wasNull()
-
ExternalQuery
public ExternalQuery(String jdbcUrl,
String query) throws SQLException
- Create a ResultSet based on a JDBC URL and a query.
- Parameters:
- jdbcUrl - the connection URL.
- query - the query to execute.
- Throws: SQLException
- thrown by JDBC calls
getResultSetMetaData
public static ResultSetMetaData getResultSetMetaData(String jdbcUrl,
String query) throws SQLException
- For the Virtual Table Interface, provide the metadata
for a given query.
- Parameters:
- jdbcUrl - the connection URL.
- query - the query to execute.
- Returns:
- the result set metadata for the query
- Throws: SQLException
- thrown by JDBC calls
next
public boolean next() throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- next in class VTITemplate
- See Also:
- ResultSet
close
public void close() throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- close in class VTITemplate
- See Also:
- ResultSet
wasNull
public boolean wasNull() throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- wasNull in class VTITemplate
- See Also:
- ResultSet
getString
public String getString(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getString in class VTITemplate
- See Also:
- ResultSet
getBoolean
public boolean getBoolean(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getBoolean in class VTITemplate
- See Also:
- ResultSet
getByte
public byte getByte(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getByte in class VTITemplate
- See Also:
- ResultSet
getShort
public short getShort(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getShort in class VTITemplate
- See Also:
- ResultSet
getInt
public int getInt(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getInt in class VTITemplate
- See Also:
- ResultSet
getLong
public long getLong(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getLong in class VTITemplate
- See Also:
- ResultSet
getFloat
public float getFloat(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getFloat in class VTITemplate
- See Also:
- ResultSet
getDouble
public double getDouble(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getDouble in class VTITemplate
- See Also:
- ResultSet
getBigDecimal
public BigDecimal getBigDecimal(int columnIndex,
int scale) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getBigDecimal in class VTITemplate
- See Also:
- ResultSet
getBytes
public byte[] getBytes(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getBytes in class VTITemplate
- See Also:
- ResultSet
getDate
public Date getDate(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getDate in class VTITemplate
- See Also:
- ResultSet
getTime
public Time getTime(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getTime in class VTITemplate
- See Also:
- ResultSet
getTimestamp
public Timestamp getTimestamp(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getTimestamp in class VTITemplate
- See Also:
- ResultSet
getAsciiStream
public InputStream getAsciiStream(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getAsciiStream in class VTITemplate
- See Also:
- ResultSet
getUnicodeStream
public InputStream getUnicodeStream(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getUnicodeStream in class VTITemplate
- See Also:
- ResultSet
getBinaryStream
public InputStream getBinaryStream(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getBinaryStream in class VTITemplate
- See Also:
- ResultSet
getString
public String getString(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getString in class VTITemplate
- See Also:
- ResultSet
getBoolean
public boolean getBoolean(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getBoolean in class VTITemplate
- See Also:
- ResultSet
getByte
public byte getByte(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getByte in class VTITemplate
- See Also:
- ResultSet
getShort
public short getShort(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getShort in class VTITemplate
- See Also:
- ResultSet
getInt
public int getInt(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getInt in class VTITemplate
- See Also:
- ResultSet
getLong
public long getLong(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getLong in class VTITemplate
- See Also:
- ResultSet
getFloat
public float getFloat(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getFloat in class VTITemplate
- See Also:
- ResultSet
getDouble
public double getDouble(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getDouble in class VTITemplate
- See Also:
- ResultSet
getBigDecimal
public BigDecimal getBigDecimal(String columnName,
int scale) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getBigDecimal in class VTITemplate
- See Also:
- ResultSet
getBytes
public byte[] getBytes(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getBytes in class VTITemplate
- See Also:
- ResultSet
getDate
public Date getDate(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getDate in class VTITemplate
- See Also:
- ResultSet
getTime
public Time getTime(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getTime in class VTITemplate
- See Also:
- ResultSet
getTimestamp
public Timestamp getTimestamp(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getTimestamp in class VTITemplate
- See Also:
- ResultSet
getAsciiStream
public InputStream getAsciiStream(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getAsciiStream in class VTITemplate
- See Also:
- ResultSet
getUnicodeStream
public InputStream getUnicodeStream(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getUnicodeStream in class VTITemplate
- See Also:
- ResultSet
getBinaryStream
public InputStream getBinaryStream(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getBinaryStream in class VTITemplate
- See Also:
- ResultSet
getWarnings
public SQLWarning getWarnings() throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getWarnings in class VTITemplate
- See Also:
- ResultSet
clearWarnings
public void clearWarnings() throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- clearWarnings in class VTITemplate
- See Also:
- ResultSet
getCursorName
public String getCursorName() throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getCursorName in class VTITemplate
- See Also:
- ResultSet
getMetaData
public ResultSetMetaData getMetaData() throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getMetaData in class VTITemplate
- See Also:
- ResultSet
getObject
public Object getObject(int columnIndex) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getObject in class VTITemplate
- See Also:
- ResultSet
getObject
public Object getObject(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- getObject in class VTITemplate
- See Also:
- ResultSet
findColumn
public int findColumn(String columnName) throws SQLException
- Throws: SQLException
- on unexpected JDBC error
- Overrides:
- findColumn in class VTITemplate
- See Also:
- ResultSet
Class Hierarchy Index