Class Hierarchy Previous Next Index
Class COM.cloudscape.vti.ExternalQuery
java.lang.Object
|
+----COM.cloudscape.vti.VTITemplate
|
+----COM.cloudscape.vti.ExternalQuery
- public class ExternalQuery
- extends VTITemplate
Copyright © 1998-2000, Informix Software, 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)
-
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(java.lang.String jdbcUrl,
java.lang.String query) throws java.sql.SQLException
Create a ResultSet based on a JDBC URL and a query.
- Parameters:
jdbcUrl
- the connection URL.
query
- the query to execute.
- Throws:
- java.sql.SQLException - thrown by JDBC calls
next
public boolean next() throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- See Also:
- java.sql.ResultSet
close
public void close() throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- See Also:
- java.sql.ResultSet
wasNull
public boolean wasNull() throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- wasNull in class VTITemplate
- See Also:
- java.sql.ResultSet
getString
public java.lang.String getString(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getString in class VTITemplate
- See Also:
- java.sql.ResultSet
getBoolean
public boolean getBoolean(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getBoolean in class VTITemplate
- See Also:
- java.sql.ResultSet
getByte
public byte getByte(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getByte in class VTITemplate
- See Also:
- java.sql.ResultSet
getShort
public short getShort(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getShort in class VTITemplate
- See Also:
- java.sql.ResultSet
getInt
public int getInt(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getInt in class VTITemplate
- See Also:
- java.sql.ResultSet
getLong
public long getLong(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getLong in class VTITemplate
- See Also:
- java.sql.ResultSet
getFloat
public float getFloat(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getFloat in class VTITemplate
- See Also:
- java.sql.ResultSet
getDouble
public double getDouble(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getDouble in class VTITemplate
- See Also:
- java.sql.ResultSet
getBigDecimal
public java.math.BigDecimal getBigDecimal(int columnIndex,
int scale) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getBigDecimal in class VTITemplate
- See Also:
- java.sql.ResultSet
getBytes
public byte[] getBytes(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getBytes in class VTITemplate
- See Also:
- java.sql.ResultSet
getDate
public java.sql.Date getDate(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getDate in class VTITemplate
- See Also:
- java.sql.ResultSet
getTime
public java.sql.Time getTime(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getTime in class VTITemplate
- See Also:
- java.sql.ResultSet
getTimestamp
public java.sql.Timestamp getTimestamp(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getTimestamp in class VTITemplate
- See Also:
- java.sql.ResultSet
getAsciiStream
public java.io.InputStream getAsciiStream(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getAsciiStream in class VTITemplate
- See Also:
- java.sql.ResultSet
getUnicodeStream
public java.io.InputStream getUnicodeStream(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getUnicodeStream in class VTITemplate
- See Also:
- java.sql.ResultSet
getBinaryStream
public java.io.InputStream getBinaryStream(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getBinaryStream in class VTITemplate
- See Also:
- java.sql.ResultSet
getString
public java.lang.String getString(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getString in class VTITemplate
- See Also:
- java.sql.ResultSet
getBoolean
public boolean getBoolean(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getBoolean in class VTITemplate
- See Also:
- java.sql.ResultSet
getByte
public byte getByte(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getByte in class VTITemplate
- See Also:
- java.sql.ResultSet
getShort
public short getShort(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getShort in class VTITemplate
- See Also:
- java.sql.ResultSet
getInt
public int getInt(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getInt in class VTITemplate
- See Also:
- java.sql.ResultSet
getLong
public long getLong(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getLong in class VTITemplate
- See Also:
- java.sql.ResultSet
getFloat
public float getFloat(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getFloat in class VTITemplate
- See Also:
- java.sql.ResultSet
getDouble
public double getDouble(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getDouble in class VTITemplate
- See Also:
- java.sql.ResultSet
getBigDecimal
public java.math.BigDecimal getBigDecimal(java.lang.String columnName,
int scale) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getBigDecimal in class VTITemplate
- See Also:
- java.sql.ResultSet
getBytes
public byte[] getBytes(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getBytes in class VTITemplate
- See Also:
- java.sql.ResultSet
getDate
public java.sql.Date getDate(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getDate in class VTITemplate
- See Also:
- java.sql.ResultSet
getTime
public java.sql.Time getTime(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getTime in class VTITemplate
- See Also:
- java.sql.ResultSet
getTimestamp
public java.sql.Timestamp getTimestamp(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getTimestamp in class VTITemplate
- See Also:
- java.sql.ResultSet
getAsciiStream
public java.io.InputStream getAsciiStream(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getAsciiStream in class VTITemplate
- See Also:
- java.sql.ResultSet
getUnicodeStream
public java.io.InputStream getUnicodeStream(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getUnicodeStream in class VTITemplate
- See Also:
- java.sql.ResultSet
getBinaryStream
public java.io.InputStream getBinaryStream(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getBinaryStream in class VTITemplate
- See Also:
- java.sql.ResultSet
getWarnings
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getWarnings in class VTITemplate
- See Also:
- java.sql.ResultSet
clearWarnings
public void clearWarnings() throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- clearWarnings in class VTITemplate
- See Also:
- java.sql.ResultSet
getCursorName
public java.lang.String getCursorName() throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getCursorName in class VTITemplate
- See Also:
- java.sql.ResultSet
getMetaData
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- See Also:
- java.sql.ResultSet
getObject
public java.lang.Object getObject(int columnIndex) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getObject in class VTITemplate
- See Also:
- java.sql.ResultSet
getObject
public java.lang.Object getObject(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- getObject in class VTITemplate
- See Also:
- java.sql.ResultSet
findColumn
public int findColumn(java.lang.String columnName) throws java.sql.SQLException
- Throws:
- java.sql.SQLException - on unexpected JDBC error
- Overrides:
- findColumn in class VTITemplate
- See Also:
- java.sql.ResultSet
Class Hierarchy Previous Next Index