Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class com.imaginary.sql.msql.MsqlResultSetMetaData

java.lang.Object
  |
  +--com.imaginary.sql.msql.MsqlResultSetMetaData

public class MsqlResultSetMetaData
extends java.lang.Object
implements java.sql.ResultSetMetaData
The MsqlResultSetMetaData class is the mSQL implementation of the JDBC ResultSetMetaData interface. It should never be referenced directly. You should instead use the JDBC API.
Last modified $Date: 1999/07/06 05:56:12 $

Version:
$Revision: 1.6 $
Author:
George Reese (borg@imaginary.com)

Method Summary
java.lang.String getCatalogName(int column)
          This operation is not supported.
java.lang.String getColumnClassName(int column)
          UDTs are not supported by mSQL. This will always return null.
int getColumnCount()
           
int getColumnDisplaySize(int column)
           
java.lang.String getColumnLabel(int column)
          mSQL-JDBC 2.0 behaviour change!
java.lang.String getColumnName(int column)
           
int getColumnType(int column)
           
java.lang.String getColumnTypeName(int column)
           
int getPrecision(int column)
          This is a total hack for mSQL, as it does not inherently have any concept of precision or scale.
int getScale(int column)
          This is a total hack for mSQL, as it does not inherently have any concept of precision or scale.
java.lang.String getSchemaName(int column)
          mSQL does not have schemas.
java.lang.String getTableName(int column)
           
boolean isAutoIncrement(int column)
           
boolean isCaseSensitive(int column)
           
boolean isCurrency(int column)
           
boolean isDefinitelyWritable(int column)
          This always returns true for the lack of anything better to do.
int isNullable(int column)
           
boolean isReadOnly(int column)
          mSQL does not support read-only mode.
boolean isSearchable(int column)
           
boolean isSigned(int column)
           
boolean isWritable(int column)
          This is always true for mSQL columns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Method Detail

getCatalogName

public java.lang.String getCatalogName(int column)
                               throws java.sql.SQLException
This operation is not supported.
Specified by:
getCatalogName(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the number of the desired column
Returns:
the catalog name for the requested column
Throws:
java.sql.SQLException - this is always thrown

getColumnClassName

public java.lang.String getColumnClassName(int column)
                                   throws java.sql.SQLException
UDTs are not supported by mSQL. This will always return null.
Specified by:
getColumnClassName(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the number of the desired column
Returns:
the fully qualified Java class name for the column map
Throws:
java.sql.SQLException - this is never thrown.

getColumnCount

public int getColumnCount()
                  throws java.sql.SQLException
Description copied from interface:
 
Specified by:
getColumnCount() in interface java.sql.ResultSetMetaData
Returns:
the number of columns in the result set
Throws:
java.sql.SQLException - this is never thrown

getColumnDisplaySize

public int getColumnDisplaySize(int column)
                        throws java.sql.SQLException
Description copied from interface:
 
Specified by:
getColumnDisplaySize(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column being queried
Returns:
the display size of the column
Throws:
java.sql.SQLException - an error occurred reading the column attributes

getColumnLabel

public java.lang.String getColumnLabel(int column)
                               throws java.sql.SQLException
mSQL-JDBC 2.0 behaviour change! This method now returns the column label without the table name prefixed onto it. In mSQL-JDBC 1.x the table name was prepended. You can retain the old behaviour by passing the command line property -Dmsql.oldlabels=1. For mSQL, this is the same as getColumnName().
Specified by:
getColumnLabel(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column being queried
Returns:
the column label
Throws:
java.sql.SQLException - an error occurred reading the column attributes

getColumnName

public java.lang.String getColumnName(int column)
                              throws java.sql.SQLException
Description copied from interface:
 
Specified by:
getColumnName(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the desired column number
Returns:
the name of the specified column
Throws:
java.sql.SQLException - an error occurred reading the column attributes

getColumnType

public int getColumnType(int column)
                 throws java.sql.SQLException
Description copied from interface:
 
Specified by:
getColumnType(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the number of the desired column
Returns:
the type from java.sql.Types of this column
Throws:
java.sql.SQLException - a error occurred reading the column attributes

getColumnTypeName

public java.lang.String getColumnTypeName(int column)
                                  throws java.sql.SQLException
Description copied from interface:
 
Specified by:
getColumnTypeName(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column number of the desired column
Returns:
the type name for the SQL type of the specified column
Throws:
java.sql.SQLException - a error occurred reading the column attributes

getPrecision

public int getPrecision(int column)
                throws java.sql.SQLException
This is a total hack for mSQL, as it does not inherently have any concept of precision or scale.
Specified by:
getPrecision(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column whose scale is desired
Returns:
the length of the column (a total hack)
Throws:
java.sql.SQLException - an error occurred reading the column attributes

getScale

public int getScale(int column)
            throws java.sql.SQLException
This is a total hack for mSQL, as it does not inherently have any concept of precision or scale.
Specified by:
getScale(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column whose scale is desired
Returns:
2 for REAL or DOUBLE, 0 for others
Throws:
java.sql.SQLException - this is never thrown

getSchemaName

public java.lang.String getSchemaName(int column)
                              throws java.sql.SQLException
mSQL does not have schemas. This method returns "".
Specified by:
getSchemaName(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the desired column
Returns:
""
Throws:
java.sql.SQLException - this is never thrown

getTableName

public java.lang.String getTableName(int column)
                             throws java.sql.SQLException
Description copied from interface:
 
Specified by:
getTableName(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the desired column number
Returns:
the name of the table from which this column was drawn
Throws:
java.sql.SQLException - an error occurred reading the column attributes

isAutoIncrement

public boolean isAutoIncrement(int column)
                       throws java.sql.SQLException
Description copied from interface:
 
Specified by:
isAutoIncrement(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column being checked
Returns:
true if the column will automatically increment on insert
Throws:
java.sql.SQLException - this is never thrown

isCaseSensitive

public boolean isCaseSensitive(int column)
                       throws java.sql.SQLException
Description copied from interface:
 
Specified by:
isCaseSensitive(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column being queried
Returns:
always true for mSQL
Throws:
java.sql.SQLException - this is never thrown

isCurrency

public boolean isCurrency(int column)
                  throws java.sql.SQLException
Description copied from interface:
 
Specified by:
isCurrency(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column being queried
Returns:
true if the field type is MsqlTypes.MONEY
Throws:
java.sql.SQLException - this is never thrown

isDefinitelyWritable

public boolean isDefinitelyWritable(int column)
                            throws java.sql.SQLException
This always returns true for the lack of anything better to do.
Specified by:
isDefinitelyWritable(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column being queried
Returns:
true
Throws:
java.sql.SQLException - this is never thrown

isNullable

public int isNullable(int column)
              throws java.sql.SQLException
Description copied from interface:
 
Specified by:
isNullable(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column being checked
Returns:
true if the specified column can be nullified
Throws:
java.sql.SQLException - this is never thrown

isReadOnly

public boolean isReadOnly(int column)
                  throws java.sql.SQLException
mSQL does not support read-only mode.
Specified by:
isReadOnly(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column being queried
Returns:
false
Throws:
java.sql.SQLException - this is never thrown

isSearchable

public boolean isSearchable(int column)
                    throws java.sql.SQLException
Description copied from interface:
 
Specified by:
isSearchable(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column to be queried
Returns:
true if the column can appear in a WHERE clause
Throws:
java.sql.SQLException - this is never thrown

isSigned

public boolean isSigned(int column)
                throws java.sql.SQLException
Description copied from interface:
 
Specified by:
isSigned(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column to be queried
Returns:
true if the column data is a signed value
Throws:
java.sql.SQLException - this is never thrown

isWritable

public boolean isWritable(int column)
                  throws java.sql.SQLException
This is always true for mSQL columns.
Specified by:
isWritable(int) in interface java.sql.ResultSetMetaData
Parameters:
column - the column being queried
Returns:
true
Throws:
java.sql.SQLException - this is never thrown

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD