All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class twz1.jdbc.mysql.RSMd

java.lang.Object
   |
   +----twz1.jdbc.mysql.RSMd

public final class RSMd
extends Object
implements ResultSetMetaData

Variable Index

 o cc
Column count
 o cnames
Hashtable of column names
 o cols
vector of column descriptors
 o errs
 o GETCATALOGNAME
 o GETCOLUMNCOUNT
 o GETCOLUMNDISPLAYSIZE
 o GETCOLUMNLABEL
 o GETCOLUMNNAME
 o GETCOLUMNTYPE
 o GETCOLUMNTYPENAME
 o GETPRECISION
 o GETSCALE
 o GETSCHEMANAME
 o GETTABLENAME
 o ISAUTOINCREMENT
 o ISCASESENSITIVE
 o ISCURRENCY
 o ISDEFINITELYWRITABLE
 o ISNULLABLE
 o ISREADONLY
 o ISSEARCHABLE
 o ISSIGNED
 o ISWRITABLE
 o pmethods
 o stmt
The parent statement.

Constructor Index

 o RSMd()
 o RSMd(jdbcMysqlStmt)

Method Index

 o addField(jdbcMysqlField)
Removed close to make it reusable and remove need for locks
 o copy()
for our purposes the vector and hashtable can be shared
 o errHandlerE(int, Exception)
 o getCatalogName(int)
See API.
 o getColumnCount()
See API docs
 o getColumnDisplaySize(int)
See API.
 o getColumnLabel(int)
See the API.
 o getColumnName(int)
See API
 o getColumnType(int)
See API.
 o getColumnTypeName(int)
See API.
 o getField(int)
 o getField(String)
 o getField(String, String)
 o getPrecision(int)
See API.
 o getScale(int)
See API
 o getSchemaName(int)
See API, returns ""
 o getTableName(int)
See API
 o iReq(int, int)
 o isAutoIncrement(int)
This should be testable, but the flags do not return this information from a standard query.
 o isCaseSensitive(int)
See API and mysql docs.
 o isCurrency(int)
Nothing in MySQL describes currency, per se
 o isDefinitelyWritable(int)
 o isNullable(int)
See API
 o isReadOnly(int)
All cols are writable.
 o isSearchable(int)
See API -- all MySQL fields are searchable.
 o isSigned(int)
See API, but true only for numeric types with unsigned not set
 o isTypeNumeric(int)
 o isWritable(int)
All cols are writable.
 o mapMySQLtypes(int, jdbcMysqlField)
 o sqlTypeNames(int)
 o sReq(int, int)
 o typeXcept(int, int)
Throw a bad type exception if rsmdXcept, else return r value.

Variables

 o stmt
 jdbcMysqlStmt stmt
The parent statement.

 o cols
 Vector cols
vector of column descriptors

 o cc
 int cc
Column count

 o cnames
 Hashtable cnames
Hashtable of column names

 o errs
 static final String errs[]
 o GETCOLUMNCOUNT
 static final int GETCOLUMNCOUNT
 o ISAUTOINCREMENT
 static final int ISAUTOINCREMENT
 o ISCASESENSITIVE
 static final int ISCASESENSITIVE
 o ISSEARCHABLE
 static final int ISSEARCHABLE
 o ISCURRENCY
 static final int ISCURRENCY
 o ISNULLABLE
 static final int ISNULLABLE
 o ISSIGNED
 static final int ISSIGNED
 o GETCOLUMNDISPLAYSIZE
 static final int GETCOLUMNDISPLAYSIZE
 o GETCOLUMNLABEL
 static final int GETCOLUMNLABEL
 o GETCOLUMNNAME
 static final int GETCOLUMNNAME
 o GETSCHEMANAME
 static final int GETSCHEMANAME
 o GETPRECISION
 static final int GETPRECISION
 o GETSCALE
 static final int GETSCALE
 o GETTABLENAME
 static final int GETTABLENAME
 o GETCATALOGNAME
 static final int GETCATALOGNAME
 o GETCOLUMNTYPE
 static final int GETCOLUMNTYPE
 o GETCOLUMNTYPENAME
 static final int GETCOLUMNTYPENAME
 o ISREADONLY
 static final int ISREADONLY
 o ISWRITABLE
 static final int ISWRITABLE
 o ISDEFINITELYWRITABLE
 static final int ISDEFINITELYWRITABLE
 o pmethods
 static final String pmethods[]

Constructors

 o RSMd
 RSMd(jdbcMysqlStmt st)
 o RSMd
 RSMd()

Methods

 o copy
 RSMd copy()
for our purposes the vector and hashtable can be shared

 o addField
 void addField(jdbcMysqlField f) throws SQLException
Removed close to make it reusable and remove need for locks

 o getField
 jdbcMysqlField getField(int column) throws SQLException
 o getField
 jdbcMysqlField getField(String cname) throws SQLException
 o getField
 jdbcMysqlField getField(String tname,
                         String cname) throws SQLException
 o getColumnCount
 public int getColumnCount() throws SQLException
See API docs

 o isAutoIncrement
 public boolean isAutoIncrement(int column) throws SQLException
This should be testable, but the flags do not return this information from a standard query. Currently returns false. Future implementations may conduct a more extensive investigation to recover this information via a call to describe.

 o isCaseSensitive
 public boolean isCaseSensitive(int column) throws SQLException
See API and mysql docs. Char, text and varchar fields are text insensitive in where clauses according to MySQL docs. Otherwise true.

 o isSearchable
 public boolean isSearchable(int column) throws SQLException
See API -- all MySQL fields are searchable.

 o isCurrency
 public boolean isCurrency(int column) throws SQLException
Nothing in MySQL describes currency, per se

 o isNullable
 public int isNullable(int column) throws SQLException
See API

 o isSigned
 public boolean isSigned(int column) throws SQLException
See API, but true only for numeric types with unsigned not set

 o getColumnDisplaySize
 public int getColumnDisplaySize(int column) throws SQLException
See API. this result could be very large for blobs.

 o getColumnLabel
 public String getColumnLabel(int column) throws SQLException
See the API. Returns the column name if it is unique and the catenated table name and column otherwise.

 o getColumnName
 public String getColumnName(int column) throws SQLException
See API

 o getSchemaName
 public String getSchemaName(int column) throws SQLException
See API, returns ""

 o getPrecision
 public int getPrecision(int column) throws SQLException
See API. For Mysql this is column size for numerics; non-numerics are exceptional. Future releases may take cognizance that signs and decimals lessen the mathematical precision of returned values.

 o getScale
 public int getScale(int column) throws SQLException
See API

 o getTableName
 public String getTableName(int column) throws SQLException
See API

 o getCatalogName
 public String getCatalogName(int column) throws SQLException
See API. For MySQL this is the name of the "database" to which the connection is currently maintained.

 o getColumnType
 public int getColumnType(int column) throws SQLException
See API. This is somewhat problematic as MySQL types do not map precisely to jdbc types.

 o getColumnTypeName
 public String getColumnTypeName(int column) throws SQLException
See API. Possible problems mapping MySQL to jdbc types.

 o isReadOnly
 public boolean isReadOnly(int column) throws SQLException
All cols are writable.

 o isWritable
 public boolean isWritable(int column) throws SQLException
All cols are writable.

 o isDefinitelyWritable
 public boolean isDefinitelyWritable(int column) throws SQLException
 o iReq
 private int iReq(int req,
                  int c) throws SQLException
 o typeXcept
 int typeXcept(int n,
               int r) throws SQLException
Throw a bad type exception if rsmdXcept, else return r value.

Parameters:
n - method name number.
r - value to return if we are not taking an exception.
 o sReq
 private String sReq(int req,
                     int c) throws SQLException
 o mapMySQLtypes
 static int mapMySQLtypes(int i,
                          jdbcMysqlField f)
 o sqlTypeNames
 static String sqlTypeNames(int type)
 o isTypeNumeric
 private boolean isTypeNumeric(int i)
 o errHandlerE
 void errHandlerE(int n,
                  Exception e) throws SQLException

All Packages  Class Hierarchy  This Package  Previous  Next  Index