Package org.sqlite.jdbc3
Class JDBC3ResultSet
- java.lang.Object
-
- org.sqlite.core.CoreResultSet
-
- org.sqlite.jdbc3.JDBC3ResultSet
-
- All Implemented Interfaces:
Codes
- Direct Known Subclasses:
JDBC4ResultSet
public abstract class JDBC3ResultSet extends CoreResultSet
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.regex.PatternCOLUMN_PRECISIONPattern used to extract the precision and scale from column meta returned by the JDBC driver.protected static java.util.regex.PatternCOLUMN_TYPECASTPattern used to extract the column type name from a cast(col as type)protected static java.util.regex.PatternCOLUMN_TYPENAMEPattern used to extract the column type name from table column definition.-
Fields inherited from class org.sqlite.core.CoreResultSet
closeStmt, cols, colsMeta, columnNameToIndex, lastCol, limitRows, maxRows, meta, open, row, stmt
-
Fields inherited from interface org.sqlite.core.Codes
SQLITE_ABORT, SQLITE_AUTH, SQLITE_BLOB, SQLITE_BUSY, SQLITE_CANTOPEN, SQLITE_CONSTRAINT, SQLITE_CORRUPT, SQLITE_DONE, SQLITE_EMPTY, SQLITE_ERROR, SQLITE_FLOAT, SQLITE_FULL, SQLITE_INTEGER, SQLITE_INTERNAL, SQLITE_INTERRUPT, SQLITE_IOERR, SQLITE_LOCKED, SQLITE_MISMATCH, SQLITE_MISUSE, SQLITE_NOLFS, SQLITE_NOMEM, SQLITE_NOTFOUND, SQLITE_NULL, SQLITE_OK, SQLITE_PERM, SQLITE_PROTOCOL, SQLITE_READONLY, SQLITE_ROW, SQLITE_SCHEMA, SQLITE_TEXT, SQLITE_TOOBIG
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJDBC3ResultSet(CoreStatement stmt)
-
Method Summary
Modifier and Type Method Description voidcheckCalendar(java.util.Calendar cal)voidclearWarnings()intfindColumn(java.lang.String col)returns col in [1,x] formjava.math.BigDecimalgetBigDecimal(int col)java.math.BigDecimalgetBigDecimal(java.lang.String col)java.io.InputStreamgetBinaryStream(int col)java.io.InputStreamgetBinaryStream(java.lang.String col)booleangetBoolean(int col)booleangetBoolean(java.lang.String col)bytegetByte(int col)bytegetByte(java.lang.String col)byte[]getBytes(int col)byte[]getBytes(java.lang.String col)java.lang.StringgetCatalogName(int col)java.io.ReadergetCharacterStream(int col)java.io.ReadergetCharacterStream(java.lang.String col)java.lang.StringgetColumnClassName(int col)intgetColumnCount()intgetColumnDisplaySize(int col)java.lang.StringgetColumnLabel(int col)java.lang.StringgetColumnName(int col)intgetColumnType(int col)java.lang.StringgetColumnTypeName(int col)intgetConcurrency()java.lang.StringgetCursorName()java.sql.DategetDate(int col)java.sql.DategetDate(int col, java.util.Calendar cal)java.sql.DategetDate(java.lang.String col)java.sql.DategetDate(java.lang.String col, java.util.Calendar cal)doublegetDouble(int col)doublegetDouble(java.lang.String col)intgetFetchDirection()intgetFetchSize()floatgetFloat(int col)floatgetFloat(java.lang.String col)intgetInt(int col)intgetInt(java.lang.String col)longgetLong(int col)longgetLong(java.lang.String col)java.sql.ResultSetMetaDatagetMetaData()java.lang.ObjectgetObject(int col)java.lang.ObjectgetObject(java.lang.String col)intgetPrecision(int col)intgetRow()intgetScale(int col)java.lang.StringgetSchemaName(int col)shortgetShort(int col)shortgetShort(java.lang.String col)java.sql.StatementgetStatement()java.lang.StringgetString(int col)java.lang.StringgetString(java.lang.String col)java.lang.StringgetTableName(int col)java.sql.TimegetTime(int col)java.sql.TimegetTime(int col, java.util.Calendar cal)java.sql.TimegetTime(java.lang.String col)java.sql.TimegetTime(java.lang.String col, java.util.Calendar cal)java.sql.TimestampgetTimestamp(int col)java.sql.TimestampgetTimestamp(int col, java.util.Calendar cal)java.sql.TimestampgetTimestamp(java.lang.String col)java.sql.TimestampgetTimestamp(java.lang.String c, java.util.Calendar ca)intgetType()java.sql.SQLWarninggetWarnings()booleanisAfterLast()booleanisAutoIncrement(int col)booleanisBeforeFirst()booleanisCaseSensitive(int col)booleanisCurrency(int col)booleanisDefinitelyWritable(int col)booleanisFirst()booleanisLast()intisNullable(int col)booleanisReadOnly(int col)booleanisSearchable(int col)booleanisSigned(int col)booleanisWritable(int col)booleannext()booleanrowDeleted()booleanrowInserted()booleanrowUpdated()voidsetFetchDirection(int d)voidsetFetchSize(int rows)booleanwasNull()-
Methods inherited from class org.sqlite.core.CoreResultSet
addColumnIndexInCache, checkCol, checkMeta, checkOpen, close, findColumnIndexInCache, getConnectionConfig, getDatabase, isOpen, markCol
-
-
-
-
Field Detail
-
COLUMN_TYPENAME
protected static final java.util.regex.Pattern COLUMN_TYPENAME
Pattern used to extract the column type name from table column definition.
-
COLUMN_TYPECAST
protected static final java.util.regex.Pattern COLUMN_TYPECAST
Pattern used to extract the column type name from a cast(col as type)
-
COLUMN_PRECISION
protected static final java.util.regex.Pattern COLUMN_PRECISION
Pattern used to extract the precision and scale from column meta returned by the JDBC driver.
-
-
Constructor Detail
-
JDBC3ResultSet
protected JDBC3ResultSet(CoreStatement stmt)
-
-
Method Detail
-
findColumn
public int findColumn(java.lang.String col) throws java.sql.SQLExceptionreturns col in [1,x] form- Throws:
java.sql.SQLException- See Also:
ResultSet.findColumn(java.lang.String)
-
next
public boolean next() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.next()
-
getType
public int getType() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getType()
-
getFetchSize
public int getFetchSize() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getFetchSize()
-
setFetchSize
public void setFetchSize(int rows) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.setFetchSize(int)
-
getFetchDirection
public int getFetchDirection() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getFetchDirection()
-
setFetchDirection
public void setFetchDirection(int d) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.setFetchDirection(int)
-
isAfterLast
public boolean isAfterLast() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.isAfterLast()
-
isBeforeFirst
public boolean isBeforeFirst() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.isBeforeFirst()
-
isFirst
public boolean isFirst() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.isFirst()
-
isLast
public boolean isLast() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.isLast()
-
getRow
public int getRow() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getRow()
-
wasNull
public boolean wasNull() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.wasNull()
-
getBigDecimal
public java.math.BigDecimal getBigDecimal(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getBigDecimal(int)
-
getBigDecimal
public java.math.BigDecimal getBigDecimal(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getBigDecimal(java.lang.String)
-
getBoolean
public boolean getBoolean(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getBoolean(int)
-
getBoolean
public boolean getBoolean(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getBoolean(java.lang.String)
-
getBinaryStream
public java.io.InputStream getBinaryStream(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getBinaryStream(int)
-
getBinaryStream
public java.io.InputStream getBinaryStream(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getBinaryStream(java.lang.String)
-
getByte
public byte getByte(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getByte(int)
-
getByte
public byte getByte(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getByte(java.lang.String)
-
getBytes
public byte[] getBytes(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getBytes(int)
-
getBytes
public byte[] getBytes(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getBytes(java.lang.String)
-
getCharacterStream
public java.io.Reader getCharacterStream(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getCharacterStream(int)
-
getCharacterStream
public java.io.Reader getCharacterStream(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getCharacterStream(java.lang.String)
-
getDate
public java.sql.Date getDate(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getDate(int)
-
getDate
public java.sql.Date getDate(int col, java.util.Calendar cal) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getDate(int, java.util.Calendar)
-
getDate
public java.sql.Date getDate(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getDate(java.lang.String)
-
getDate
public java.sql.Date getDate(java.lang.String col, java.util.Calendar cal) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getDate(java.lang.String, java.util.Calendar)
-
getDouble
public double getDouble(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getDouble(int)
-
getDouble
public double getDouble(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getDouble(java.lang.String)
-
getFloat
public float getFloat(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getFloat(int)
-
getFloat
public float getFloat(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getFloat(java.lang.String)
-
getInt
public int getInt(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getInt(int)
-
getInt
public int getInt(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getInt(java.lang.String)
-
getLong
public long getLong(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getLong(int)
-
getLong
public long getLong(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getLong(java.lang.String)
-
getShort
public short getShort(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getShort(int)
-
getShort
public short getShort(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getShort(java.lang.String)
-
getString
public java.lang.String getString(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getString(int)
-
getString
public java.lang.String getString(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getString(java.lang.String)
-
getTime
public java.sql.Time getTime(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getTime(int)
-
getTime
public java.sql.Time getTime(int col, java.util.Calendar cal) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getTime(int, java.util.Calendar)
-
getTime
public java.sql.Time getTime(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getTime(java.lang.String)
-
getTime
public java.sql.Time getTime(java.lang.String col, java.util.Calendar cal) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getTime(java.lang.String, java.util.Calendar)
-
getTimestamp
public java.sql.Timestamp getTimestamp(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getTimestamp(int)
-
getTimestamp
public java.sql.Timestamp getTimestamp(int col, java.util.Calendar cal) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getTimestamp(int, java.util.Calendar)
-
getTimestamp
public java.sql.Timestamp getTimestamp(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getTimestamp(java.lang.String)
-
getTimestamp
public java.sql.Timestamp getTimestamp(java.lang.String c, java.util.Calendar ca) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getTimestamp(java.lang.String, java.util.Calendar)
-
getObject
public java.lang.Object getObject(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getObject(int)
-
getObject
public java.lang.Object getObject(java.lang.String col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getObject(java.lang.String)
-
getStatement
public java.sql.Statement getStatement()
- See Also:
ResultSet.getStatement()
-
getCursorName
public java.lang.String getCursorName() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getCursorName()
-
getWarnings
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getWarnings()
-
clearWarnings
public void clearWarnings() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.clearWarnings()
-
getMetaData
public java.sql.ResultSetMetaData getMetaData() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getMetaData()
-
getCatalogName
public java.lang.String getCatalogName(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getCatalogName(int)
-
getColumnClassName
public java.lang.String getColumnClassName(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getColumnClassName(int)
-
getColumnCount
public int getColumnCount() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getColumnCount()
-
getColumnDisplaySize
public int getColumnDisplaySize(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getColumnDisplaySize(int)
-
getColumnLabel
public java.lang.String getColumnLabel(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getColumnLabel(int)
-
getColumnName
public java.lang.String getColumnName(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getColumnName(int)
-
getColumnType
public int getColumnType(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getColumnType(int)
-
getColumnTypeName
public java.lang.String getColumnTypeName(int col) throws java.sql.SQLException- Returns:
- The data type from either the 'create table' statement, or CAST(expr AS TYPE) otherwise sqlite3_value_type.
- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getColumnTypeName(int)
-
getPrecision
public int getPrecision(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getPrecision(int)
-
getScale
public int getScale(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getScale(int)
-
getSchemaName
public java.lang.String getSchemaName(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getSchemaName(int)
-
getTableName
public java.lang.String getTableName(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.getTableName(int)
-
isNullable
public int isNullable(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.isNullable(int)
-
isAutoIncrement
public boolean isAutoIncrement(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.isAutoIncrement(int)
-
isCaseSensitive
public boolean isCaseSensitive(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.isCaseSensitive(int)
-
isCurrency
public boolean isCurrency(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.isCurrency(int)
-
isDefinitelyWritable
public boolean isDefinitelyWritable(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.isDefinitelyWritable(int)
-
isReadOnly
public boolean isReadOnly(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.isReadOnly(int)
-
isSearchable
public boolean isSearchable(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.isSearchable(int)
-
isSigned
public boolean isSigned(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.isSigned(int)
-
isWritable
public boolean isWritable(int col) throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSetMetaData.isWritable(int)
-
getConcurrency
public int getConcurrency() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.getConcurrency()
-
rowDeleted
public boolean rowDeleted() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.rowDeleted()
-
rowInserted
public boolean rowInserted() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.rowInserted()
-
rowUpdated
public boolean rowUpdated() throws java.sql.SQLException- Throws:
java.sql.SQLException- See Also:
ResultSet.rowUpdated()
-
checkCalendar
public void checkCalendar(java.util.Calendar cal) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
-