java.sql

Interface ResultSetMetaData

Known Subinterfaces:
RowSetMetaData
Known Implementing Classes:
RowSetMetaDataImpl

public interface ResultSetMetaData

An object that can be used to get information about the types and properties of the columns in a ResultSet object. The following code fragment creates the ResultSet object rs, creates the ResultSetMetaData object rsmd, and uses rsmd to find out how many columns rs has and whether the first column in rs can be used in a WHERE clause.

     ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
     ResultSetMetaData rsmd = rs.getMetaData();
     int numberOfColumns = rsmd.getColumnCount();
     boolean b = rsmd.isSearchable(1);

 

Field Summary

static int
columnNoNulls
The constant indicating that a column does not allow NULL values.
static int
columnNullable
The constant indicating that a column allows NULL values.
static int
columnNullableUnknown
The constant indicating that the nullability of a column's values is unknown.

Method Summary

String
getCatalogName(int column)
Gets the designated column's table's catalog name.
String
getColumnClassName(int column)
Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
int
getColumnCount()
Returns the number of columns in this ResultSet object.
int
getColumnDisplaySize(int column)
Indicates the designated column's normal maximum width in characters.
String
getColumnLabel(int column)
Gets the designated column's suggested title for use in printouts and displays.
String
getColumnName(int column)
Get the designated column's name.
int
getColumnType(int column)
Retrieves the designated column's SQL type.
String
getColumnTypeName(int column)
Retrieves the designated column's database-specific type name.
int
getPrecision(int column)
Get the designated column's number of decimal digits.
int
getScale(int column)
Gets the designated column's number of digits to right of the decimal point.
String
getSchemaName(int column)
Get the designated column's table's schema.
String
getTableName(int column)
Gets the designated column's table name.
boolean
isAutoIncrement(int column)
Indicates whether the designated column is automatically numbered, thus read-only.
boolean
isCaseSensitive(int column)
Indicates whether a column's case matters.
boolean
isCurrency(int column)
Indicates whether the designated column is a cash value.
boolean
isDefinitelyWritable(int column)
Indicates whether a write on the designated column will definitely succeed.
int
isNullable(int column)
Indicates the nullability of values in the designated column.
boolean
isReadOnly(int column)
Indicates whether the designated column is definitely not writable.
boolean
isSearchable(int column)
Indicates whether the designated column can be used in a where clause.
boolean
isSigned(int column)
Indicates whether values in the designated column are signed numbers.
boolean
isWritable(int column)
Indicates whether it is possible for a write on the designated column to succeed.

Field Details

columnNoNulls

public static final int columnNoNulls
The constant indicating that a column does not allow NULL values.
Field Value:
0
Usages and Demos :

View More Examples of ResultSetMetaData.columnNoNulls
   1:         switch (rsmd.isNullable(i)) {
   2:         case ResultSetMetaData.columnNoNulls:
   3:           System.out.println("No Nulls");
   4:           break;
   5:         case ResultSetMetaData.columnNullable:

View Full Code Here
   1:         switch (rsmd.isNullable(i)) {
   2:         case ResultSetMetaData.columnNoNulls:
   3:           System.out.println("No Nulls");
   4:           break;
   5:         case ResultSetMetaData.columnNullable:

View Full Code Here
   1:                 ResultSetMetaData.columnNullable :
   2:                 ResultSetMetaData.columnNoNulls;
   3:     }
   4: 
   5:     public static boolean isSigned(DataTypeDescriptor dtd) {

View Full Code Here
   1:       currency[i] = false;
   2:       nullable[i] = ResultSetMetaData.columnNoNulls;
   3:       searchable[i] = false;
   4:       signed[i] = false;
   5:     }

View Full Code Here
   1:         } else {
   2:             return java.sql.ResultSetMetaData.columnNoNulls;
   3:         }
   4:     }

View Full Code Here

columnNullable

public static final int columnNullable
The constant indicating that a column allows NULL values.
Field Value:
1
Usages and Demos :

View More Examples of ResultSetMetaData.columnNullable
   1:           break;
   2:         case ResultSetMetaData.columnNullable:
   3:           System.out.println("Nullable");
   4:           break;

View Full Code Here
   1:           break;
   2:         case ResultSetMetaData.columnNullable:
   3:           System.out.println("Nullable");
   4:           break;

View Full Code Here
   1:         return dtd.isNullable() ?
   2:                 ResultSetMetaData.columnNullable :
   3:                 ResultSetMetaData.columnNoNulls;
   4:     }

View Full Code Here
   1:         if (!getField(column).isNotNull()) {
   2:             return java.sql.ResultSetMetaData.columnNullable;
   3:         } else {
   4:             return java.sql.ResultSetMetaData.columnNoNulls;
   5:         }

View Full Code Here

columnNullableUnknown

public static final int columnNullableUnknown
The constant indicating that the nullability of a column's values is unknown.
Field Value:
2
Usages and Demos :

View More Examples of ResultSetMetaData.columnNullableUnknown
   1: 
   2:         case ResultSetMetaData.columnNullableUnknown:
   3:           System.out.println("Unknown");
   4:           break;
   5:         }

View Full Code Here
   1: 
   2:         case ResultSetMetaData.columnNullableUnknown:
   3:           System.out.println("Unknown");
   4:           break;
   5:         }

View Full Code Here
   1:             rs.checkColumnIndex(column);
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         } catch(Throwable e) {
   4:             throw convertThrowable(e);
   5:         }

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4: 
   5:         public java.sql.Array getArray() throws java.sql.SQLException {

View Full Code Here

Method Details

getCatalogName

public String getCatalogName(int column)
            throws SQLException
Gets the designated column's table's catalog name.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
the name of the catalog for the table in which the given column appears or "" if not applicable
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getCatalogName(int column)
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11: 
  12:     public String getCatalogName(int column) throws SQLException {return rsmd.getCatalogName(column);}

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:     
   6:     public RsMd2DbMdResultSet(ResultSetMetaData rsmd)throws SQLException {
   7:         contents = new LinkedList();
   8:         ...
   9:         for(int i = 1; i <= colCount; i++){
  10:             row[TABLE_CAT] = rsmd.getCatalogName(i);
  11:             row[TABLE_SCHEM] = rsmd.getSchemaName(i);
  12:         ...
  13:     }
  14:     public ResultSetMetaData getMetaData() throws SQLException{

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:   private void extractSQLMetaData( ResultSetMetaData meta )
   7:   {
   8:         ...
   9:         addAttributeToNode(
  10:           meta.getCatalogName(i),
  11:           m_ColAttrib_CATALOGUE_NAME_TypeID, lastColHeaderIdx);

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4:         ...
   5:         private int m_origIdx;
   6:         private ResultSetMetaData m_md;
   7:         
   8:         ...
   9:         
  10:         public UnderlyingColumn(ResultSet rs, int idx, int origIdx, ResultSetMetaData md) throws SQLException {
  11:             super(idx, md.getColumnName(origIdx));
  12:         ...
  13:         public String getCatalogName() throws SQLException {
  14:             return m_md.getCatalogName(m_origIdx);

View Full Code Here

getColumnClassName

public String getColumnClassName(int column)
            throws SQLException
Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column. ResultSet.getObject may return a subclass of the class returned by this method.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
the fully-qualified name of the class in the Java programming language that would be used by the method ResultSet.getObject to retrieve the value in the specified column. This is the class name used for custom mapping.
Throws:
SQLException - if a database access error occurs
Since:
1.2
Usages and Demos :

View More Examples of getColumnClassName(int column)
   1: 
   2:            ResultSetMetaData oRSMD = oRS.getMetaData();
   3:            oLogger.debug("metadata got");
   4:         ...
   5:              String sColName  = oRSMD.getColumnName(i);
   6:              String sColClass = oRSMD.getColumnClassName(i);
   7:              oLogger.debug("found ["+sColName+"] of class ["+sColClass+"]");
   8:              boolean boIgnore = false;
   9:              if(null != aIgnoreFields){

View Full Code Here
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11:         
  12:     public String getColumnClassName(int column) throws SQLException {return rsmd.getColumnClassName(column);}

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4:         ...
   5:         private int m_origIdx;
   6:         private ResultSetMetaData m_md;
   7:         
   8:         ...
   9:         
  10:         public UnderlyingColumn(ResultSet rs, int idx, int origIdx, ResultSetMetaData md) throws SQLException {
  11:             super(idx, md.getColumnName(origIdx));
  12:         ...
  13:         public String getColumnClassName() throws SQLException {
  14:             return m_md.getColumnClassName(m_origIdx);

View Full Code Here

getColumnCount

public int getColumnCount()
            throws SQLException
Returns the number of columns in this ResultSet object.
Returns:
the number of columns
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getColumnCount()
   1:       ResultSet r = s.executeQuery(sql);
   2:       ResultSetMetaData rm = r.getMetaData();
   3:         ...
   4:       for (int i = 1; i <= rm.getColumnCount(); i++) 
   5:         ...
   6:         out.println(rm.getColumnName(i) + (i==rm.getColumnCount() ? "<BR>" : ";"));
   7:       pageContext.setAttribute(ident, r);

View Full Code Here
   1: 
   2:             ResultSetMetaData md = uprs.getMetaData();
   3:             System.out.println("Resultset has " +
   4:         ...
   5:                 md.getColumnCount() + " cols.");
   6: 
   7:             int rowNum = uprs.getRow();
   8:             System.out.println("row1 " + rowNum);

View Full Code Here
   1:             header = new ArrayList();
   2:             ResultSetMetaData meta = rs.getMetaData();
   3:         ...
   4:             int len = meta.getColumnCount();
   5:             for(int i=0; i<len; i++) {
   6:                 Column column = new Column(meta, i+1);
   7:             }

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:       ResultSetMetaData metaData = data.getMetaData();
   7:       
   8:         ...
   9:       Vector [] columns = new Vector[metaData.getColumnCount()];
  10:       for (int i=0;i<columns.length;i++)

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.Types;
   4:         ...
   5:         
   6:         ResultSetMetaData rsMeta = rs.getMetaData();
   7:         ...
   8:         itemNames = new String[rsMeta.getColumnCount()];
   9:         ...
  10:         itemTypes = new OpenType[rsMeta.getColumnCount()];

View Full Code Here

getColumnDisplaySize

public int getColumnDisplaySize(int column)
            throws SQLException
Indicates the designated column's normal maximum width in characters.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
the normal maximum number of characters allowed as the width of the designated column
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getColumnDisplaySize(int column)
   1:     
   2:         ResultSetMetaData metadata = rs.getMetaData();
   3:         
   4:         ...
   5:         
   6:             int size = metadata.getColumnDisplaySize(i+1);
   7:             int labelsize = labels[i].length();
   8:             if (labelsize > size) size = labelsize;   
   9:         }

View Full Code Here
   1:     
   2:         ResultSetMetaData metadata = rs.getMetaData();
   3:         
   4:         ...
   5:         
   6:             int size = metadata.getColumnDisplaySize(i+1);
   7:             int labelsize = labels[i].length();
   8:             if (labelsize > size) size = labelsize;   
   9:         }

View Full Code Here
   1:     private ResultSet  resultSet;
   2:     private ResultSetMetaData metaData;
   3:     private RSMetaData rsMetaData = null;
   4:         ...
   5:         {
   6:             retVal = metaData.getColumnDisplaySize(nIndex);
   7:         }
   8:         catch (SQLException sqle) {}
   9:         return retVal;

View Full Code Here
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11: 
  12:     public int getColumnDisplaySize(int column) throws SQLException {return rsmd.getColumnDisplaySize(column);}

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4:         ...
   5:         private int m_origIdx;
   6:         private ResultSetMetaData m_md;
   7:         
   8:         ...
   9:         
  10:         public UnderlyingColumn(ResultSet rs, int idx, int origIdx, ResultSetMetaData md) throws SQLException {
  11:             super(idx, md.getColumnName(origIdx));
  12:         ...
  13:         public int getColumnDisplaySize() throws SQLException {
  14:             return m_md.getColumnDisplaySize(m_origIdx);

View Full Code Here

getColumnLabel

public String getColumnLabel(int column)
            throws SQLException
Gets the designated column's suggested title for use in printouts and displays.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
the suggested column title
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getColumnLabel(int column)
   1:     int columns = 0;
   2:     ResultSetMetaData md = null;
   3: 
   4:         ...
   5:       pw.print("  <th align=left>");
   6:       String label = md.getColumnLabel(i+1);
   7:       pw.print( label == null?"<br>" : label ) ;
   8:       pw.println("</th>");
   9:     }

View Full Code Here
   1:             ResultSet rs = pstmt.executeQuery ();
   2:             ResultSetMetaData meta = rs.getMetaData();
   3:             while (rs.next ())
   4:         ...
   5:                 {
   6:                     result.append(meta.getColumnLabel(col)).append(" = ");
   7:                     result.append(rs.getString(col));
   8:                     result.append(Env.NL);
   9:             }

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:   private ResultSet resultset;
   6:   private ResultSetMetaData dbmd;
   7:   private int rowCount;
   8:         ...
   9:         {
  10:           return dbmd.getColumnLabel(column + 1);
  11:         }

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:   {
   6:     final ResultSetMetaData rsmd = rs.getMetaData();
   7:     final int colcount = rsmd.getColumnCount();
   8:         ...
   9:       {
  10:         final String name = rsmd.getColumnLabel(i + 1);
  11:         header.add(name);

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:   {
   6:     final ResultSetMetaData rsmd = rs.getMetaData();
   7:     final int colcount = rsmd.getColumnCount();
   8:         ...
   9:       {
  10:         final String name = rsmd.getColumnLabel(i + 1);
  11:         header.add(name);

View Full Code Here

getColumnName

public String getColumnName(int column)
            throws SQLException
Get the designated column's name.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
column name
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getColumnName(int column)
   1: import javax.swing.table.AbstractTableModel;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:         try {
   6:             ResultSetMetaData meta = rowSet.getMetaData();
   7: 
   8:         ...
   9:         try {
  10:             ResultSetMetaData meta = rowSet.getMetaData();
  11: 
  12:         ...
  13:             }
  14:             return meta.getColumnName(col+1);

View Full Code Here
   1:       {  
   2:          return rsmd.getColumnName(c + 1);
   3:       }
   4:         ...
   5:    private ResultSet rs;
   6:    private ResultSetMetaData rsmd;
   7: }

View Full Code Here
   1:    private ResultSet resultSet;
   2:    private ResultSetMetaData metaData;
   3:    private int numberOfRows;
   4:         ...
   5:       try {
   6:          return metaData.getColumnName( column + 1 );  
   7:       }
   8:       
   9:       catch ( SQLException sqlException ) {

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:   {
   6:     ResultSetMetaData md = rs.getMetaData();
   7:     
   8:         ...
   9:   {
  10:     ResultSetMetaData md;
  11: 
  12:         ...
  13:     for (int i = 0; i < nColumns; i++) {
  14:       String name = md.getColumnName(i + 1);

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:   private ResultSet resultset;
   6:   private ResultSetMetaData dbmd;
   7:   private int rowCount;
   8:         ...
   9:         {
  10:           return dbmd.getColumnName(column + 1);
  11:         }

View Full Code Here

getColumnType

public int getColumnType(int column)
            throws SQLException
Retrieves the designated column's SQL type.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
SQL type from java.sql.Types
Throws:
SQLException - if a database access error occurs
See Also:
Types
Usages and Demos :

View More Examples of getColumnType(int column)
   1: 
   2:   public static ValueConverter getConverter(ResultSetMetaData rsm, int columnIndex)
   3:       throws SQLException
   4:         ...
   5:     int scale = rsm.getScale(columnIndex);
   6:     int sqlType = rsm.getColumnType(columnIndex);
   7: 
   8:     if (sqlType == Types.INTEGER
   9:         || classname.equalsIgnoreCase("java.lang.Integer")

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.DatabaseMetaData;
   4:         ...
   5:     private void getMetaDataInfo() throws SQLException {
   6:         ResultSetMetaData metaData = rs.getMetaData();
   7:         columnCount                = metaData.getColumnCount();
   8:         ...
   9:         for (int i=0; i<numColumns; i++) {
  10:             int jdbcTypeId = metaData.getColumnType(i+1);
  11:             columnNames[i] = metaData.getColumnName(i+1);

View Full Code Here
   1: 
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: {
   6:     private ResultSetMetaData rsMetaData;
   7:     private int columnCount;
   8:         ...
   9:             {
  10:                 int jdbcType = rsMetaData.getColumnType(i + 1);
  11:                 Object item = SqlHelper.getObjectFromColumn(super.m_rsAndStmt.m_rs, jdbcType, i + 1);

View Full Code Here
   1: 
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:     private ResultSetMetaData rsMetaData;
   7:     private int columnCount;
   8:         ...
   9:             {
  10:                 int jdbcType = rsMetaData.getColumnType(i + 1);
  11:                 Object item = SqlHelper.getObjectFromColumn(super.m_rsAndStmt.m_rs, jdbcType, i + 1);

View Full Code Here
   1: import fr.paris.lutece.util.sql.DAOUtil;
   2: import java.sql.ResultSetMetaData ;
   3: import java.sql.SQLException ;
   4:         ...
   5:         {
   6:             ResultSetMetaData rsmd = daoUtil.getResultSet ().getMetaData ();
   7:             return rsmd.getColumnCount ();
   8:         ...
   9:         {
  10:             ResultSetMetaData rsmd = daoUtil.getResultSet ().getMetaData ();
  11:             return rsmd.getColumnName (nColumn);
  12:         ...
  13:             ResultSetMetaData rsmd = daoUtil.getResultSet ().getMetaData ();
  14:             return rsmd.getColumnType(nColumn);

View Full Code Here

getColumnTypeName

public String getColumnTypeName(int column)
            throws SQLException
Retrieves the designated column's database-specific type name.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
type name used by the database. If the column type is a user-defined type, then a fully-qualified type name is returned.
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getColumnTypeName(int column)
   1:     ResultSet rs = con.createStatement().executeQuery( "SELECT * FROM GEODB_LOCATIONS" );
   2:     ResultSetMetaData meta = rs.getMetaData();
   3: 
   4:         ...
   5:       System.out.println( meta.getColumnLabel(i) + "\t\t\t" +
   6:                           meta.getColumnTypeName(i) );
   7: 
   8:       if ( meta.isSigned(i) )
   9:         numerics++;

View Full Code Here
   1:         
   2:         ResultSetMetaData metaData = rs.getMetaData();
   3:         
   4:         ...
   5:         
   6:         ResultSetMetaData metaData = rs.getMetaData();
   7:                   
   8:         ...
   9: 
  10:         ResultSetMetaData metaData = rs.getMetaData();
  11: 
  12:         ...
  13:         assertTrue("simple_field must be of type VARCHAR",
  14:                 metaData.getColumnTypeName(1).equals("VARCHAR"));

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:     public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
   6:         ResultSetMetaData rsmd = rs.getMetaData();
   7:         int nrOfColumns = rsmd.getColumnCount();
   8:         ...
   9:                         "Type mismatch affecting row number " + rowNum + " and column type '" +
  10:                         rsmd.getColumnTypeName(1) + "': " + ex.getMessage());
  11:             }

View Full Code Here
   1: 
   2:         ResultSetMetaData rsmd = rs.getMetaData();
   3: 
   4:         ...
   5:             logcol.name = rsmd.getColumnName(i).toUpperCase();
   6:             logcol.type = rsmd.getColumnTypeName(i);
   7:             logcol.nullable = (rsmd.isNullable(i) == rsmd.columnNullable);
   8:          logcol.isWritable = rsmd.isWritable(i);
   9:          if(!logcol.isWritable) logcol.ignore = true;

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:   private void extractSQLMetaData( ResultSetMetaData meta )
   7:   {
   8:         ...
   9:         addAttributeToNode(
  10:           meta.getColumnTypeName(i),
  11:           m_ColAttrib_COLUMN_TYPENAME_TypeID, lastColHeaderIdx);

View Full Code Here

getPrecision

public int getPrecision(int column)
            throws SQLException
Get the designated column's number of decimal digits.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
precision
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getPrecision(int column)
   1:             String createstring = "CREATE TABLE DB2INST1.EMPPWD (";
   2:             ResultSetMetaData md = rs.getMetaData();
   3:             int n = md.getColumnCount();
   4:         ...
   5:                 case 1: 
   6:                     createstring += "CHAR(" + md.getPrecision(i) + ")";
   7:         ...
   8:                     k = md.getPrecision(i);
   9:                     break;
  10:         ...
  11:                     createstring += "INTEGER";
  12:                     k = md.getPrecision(i);

View Full Code Here
   1:         
   2:         ResultSetMetaData metaData = rs.getMetaData();
   3:         
   4:         ...
   5:         assertTrue("simple_field must have size 60", 
   6:             metaData.getPrecision(1) == 60);
   7:             
   8:         ...
   9:         assertTrue("two_byte_field must have size 60", 
  10:             metaData.getPrecision(2) == 60);
  11: 
  12:         ...
  13:         assertTrue("three_byte_field must have size 60", 
  14:             metaData.getPrecision(3) == 60);

View Full Code Here
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11: 
  12:     public int getPrecision(int column) throws SQLException {return rsmd.getPrecision(column);}

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4:         ...
   5:         private int m_origIdx;
   6:         private ResultSetMetaData m_md;
   7:         
   8:         ...
   9:         
  10:         public UnderlyingColumn(ResultSet rs, int idx, int origIdx, ResultSetMetaData md) throws SQLException {
  11:             super(idx, md.getColumnName(origIdx));
  12:         ...
  13:         public int getPrecision() throws SQLException {
  14:             return m_md.getPrecision(m_origIdx);

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:         ResultSetMetaData rsmeta = rs.getMetaData();
   7:         int ncols = rsmeta.getColumnCount();
   8:         ...
   9:         PreparedStatement ps = stmt.getPreparedStatement();
  10:         ResultSetMetaData rsmeta = ps.getMetaData();
  11:         ParameterMetaData pmeta = stmt.getParameterMetaData();
  12:         ...
  13:             {
  14:                 precision = rsmeta.getPrecision(i);

View Full Code Here

getScale

public int getScale(int column)
            throws SQLException
Gets the designated column's number of digits to right of the decimal point.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
scale
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getScale(int column)
   1:     
   2:     Column(ResultSetMetaData meta, int index) throws SQLException {
   3:         name = meta.getColumnLabel(index);
   4:         ...
   5:             precision = meta.getPrecision(index);
   6:             scale = meta.getScale(index);
   7:         case Types.BLOB:
   8:         case Types.BINARY:
   9:         case Types.CLOB:

View Full Code Here
   1: 
   2:   public static ValueConverter getConverter(ResultSetMetaData rsm, int columnIndex)
   3:       throws SQLException
   4:         ...
   5:     int precision = rsm.getPrecision(columnIndex);
   6:     int scale = rsm.getScale(columnIndex);
   7:     int sqlType = rsm.getColumnType(columnIndex);
   8: 
   9:     if (sqlType == Types.INTEGER

View Full Code Here
   1:             String createstring = "CREATE TABLE DB2INST1.EMPPWD (";
   2:             ResultSetMetaData md = rs.getMetaData();
   3:             int n = md.getColumnCount();
   4:         ...
   5:                 case 3:
   6:                     createstring += "DECIMAL(" + md.getPrecision(i) + ", " + md.getScale(i) + ")";
   7:         ...
   8:                     if (md.getScale(i) != 0) {
   9:         ...
  10:                         k = md.getPrecision(i) + 1 + md.getScale(i);

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:             ResultSetMetaData rsmd = rs.getMetaData();
   7:             assertTrue("Precision returned incorrectly for type " + typeName
   8:         ...
   9:                 assertTrue("Scale returned incorrectly for type " + typeName
  10:                     + ", " + d + " != rsmd.getScale() = " + rsmd.getScale(1),
  11:         ...
  12:                     rsmd.getScale(1) == d);

View Full Code Here
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11: 
  12:     public int getScale(int column) throws SQLException {return rsmd.getScale(column);}

View Full Code Here

getSchemaName

public String getSchemaName(int column)
            throws SQLException
Get the designated column's table's schema.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
schema name or "" if not applicable
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getSchemaName(int column)
   1: import java.io.Serializable;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6: public class DCResultSetMetaData implements Serializable, ResultSetMetaData {
   7:   
   8:         ...
   9:       currency[i] = false;
  10:       nullable[i] = ResultSetMetaData.columnNoNulls;
  11:       searchable[i] = false;
  12:         ...
  13:       scales[i] = md.getScale(j);
  14:       schemaNames[i] = md.getSchemaName(j);

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: 
   4:         ...
   5: 
   6:       ResultSetMetaData meta = rs.getMetaData();
   7:       int numberOfColumns = meta.getColumnCount();
   8:         ...
   9:                   buf.append(" table='").append(meta.getTableName(i)).append("'");
  10:                String schema = meta.getSchemaName(i);
  11:                if (schema != null && schema.length() > 0)

View Full Code Here
   1:         SQLPluginAppConfig appConfig=SQLPluginAppConfig.getInstance();
   2:         ResultSetMetaData metaData=resultSet.getMetaData();
   3: 
   4:         ...
   5: 
   6:     private static String getTableName(ResultSetMetaData metaData, int column)
   7:     {
   8:         ...
   9: 
  10:     private static String getSchemaName(ResultSetMetaData metaData, int column)
  11:     {
  12:         ...
  13:         {
  14:             schemaName=metaData.getSchemaName(column);

View Full Code Here
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11:     
  12:     public String getSchemaName(int column) throws SQLException {return rsmd.getSchemaName(column);}

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:     
   6:     public RsMd2DbMdResultSet(ResultSetMetaData rsmd)throws SQLException {
   7:         contents = new LinkedList();
   8:         ...
   9:             row[TABLE_CAT] = rsmd.getCatalogName(i);
  10:             row[TABLE_SCHEM] = rsmd.getSchemaName(i);
  11:             row[TABLE_NAME] = rsmd.getTableName(i);
  12:         ...
  13:     }
  14:     public ResultSetMetaData getMetaData() throws SQLException{

View Full Code Here

getTableName

public String getTableName(int column)
            throws SQLException
Gets the designated column's table name.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
table name or "" if not applicable
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of getTableName(int column)
   1: 
   2:         ResultSetMetaData rsMetaData = rs.getMetaData();
   3:         int numberOfColumns = rsMetaData.getColumnCount();
   4:         ...
   5:             String columnName = rsMetaData.getColumnName(i);
   6:             String tableName = rsMetaData.getTableName(i);
   7:             columnNames.append("<column name=\""+columnName+
   8:                "\" table=\""+tableName+"\"/>");
   9:         }

View Full Code Here
   1: 
   2:         ResultSetMetaData rsMetaData = rs.getMetaData();
   3:         int numberOfColumns = rsMetaData.getColumnCount();
   4:         ...
   5:             String columnName = rsMetaData.getColumnName(i);
   6:             String tableName = rsMetaData.getTableName(i);
   7:             columnNames.append("<column name=\""+columnName+"\" table=\""+tableName+"\"/>");
   8:         }
   9:         columnNames.append("</columnNames>");

View Full Code Here
   1: 
   2:         ResultSetMetaData rsMetaData = rs.getMetaData();
   3:         int numberOfColumns = rsMetaData.getColumnCount();
   4:         ...
   5:             String columnName = rsMetaData.getColumnName(i);
   6:             String tableName = rsMetaData.getTableName(i);
   7:             columnNames.append("<column name=\""+columnName+"\" table=\""+tableName+"\"/>");
   8:         }
   9:         columnNames.append("</columnNames>");

View Full Code Here
   1:     Vector colNames =new Vector();
   2:     ResultSetMetaData   metaData;
   3: 
   4:         ...
   5:         try {
   6:             String tableName = metaData.getTableName(column+1);
   7:             if (tableName == null) {
   8:                 System.out.println("Table name returned null.");
   9:             }

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:   private ArrayList rows = new ArrayList();
   6:   private ResultSetMetaData metaData;
   7:   private String communityName;
   8:         ...
   9:     try {
  10:       tableName = metaData.getTableName(1);
  11:     } catch (SQLException e) {
  12:         ...
  13:     try {
  14:       tableName = metaData.getTableName(column+1);

View Full Code Here

isAutoIncrement

public boolean isAutoIncrement(int column)
            throws SQLException
Indicates whether the designated column is automatically numbered, thus read-only.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of isAutoIncrement(int column)
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11: 
  12:     public boolean isAutoIncrement(int column) throws SQLException {return rsmd.isAutoIncrement(column);}

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4:         ...
   5:         private int m_origIdx;
   6:         private ResultSetMetaData m_md;
   7:         
   8:         ...
   9:         
  10:         public UnderlyingColumn(ResultSet rs, int idx, int origIdx, ResultSetMetaData md) throws SQLException {
  11:             super(idx, md.getColumnName(origIdx));
  12:         ...
  13:         public boolean isAutoIncrement() throws SQLException {
  14:             return m_md.isAutoIncrement(m_origIdx);

View Full Code Here

isCaseSensitive

public boolean isCaseSensitive(int column)
            throws SQLException
Indicates whether a column's case matters.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of isCaseSensitive(int column)
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11: 
  12:     public boolean isCaseSensitive(int column) throws SQLException {return rsmd.isCaseSensitive(column);}

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:   private void extractSQLMetaData( ResultSetMetaData meta )
   7:   {
   8:         ...
   9:         addAttributeToNode(
  10:           meta.isCaseSensitive(i) ? S_ISTRUE : S_ISFALSE,
  11:           m_ColAttrib_CASESENSITIVE_TypeID, lastColHeaderIdx);

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4:         ...
   5:         private int m_origIdx;
   6:         private ResultSetMetaData m_md;
   7:         
   8:         ...
   9:         
  10:         public UnderlyingColumn(ResultSet rs, int idx, int origIdx, ResultSetMetaData md) throws SQLException {
  11:             super(idx, md.getColumnName(origIdx));
  12:         ...
  13:         public boolean isCaseSensitive() throws SQLException {
  14:             return m_md.isCaseSensitive(m_origIdx);

View Full Code Here

isCurrency

public boolean isCurrency(int column)
            throws SQLException
Indicates whether the designated column is a cash value.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of isCurrency(int column)
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11: 
  12:     public boolean isCurrency(int column) throws SQLException {return rsmd.isCurrency(column);}

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4:         ...
   5:         private int m_origIdx;
   6:         private ResultSetMetaData m_md;
   7:         
   8:         ...
   9:         
  10:         public UnderlyingColumn(ResultSet rs, int idx, int origIdx, ResultSetMetaData md) throws SQLException {
  11:             super(idx, md.getColumnName(origIdx));
  12:         ...
  13:         public boolean isCurrency() throws SQLException {
  14:             return m_md.isCurrency(m_origIdx);

View Full Code Here

isDefinitelyWritable

public boolean isDefinitelyWritable(int column)
            throws SQLException
Indicates whether a write on the designated column will definitely succeed.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of isDefinitelyWritable(int column)
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11: 
  12:     public boolean isDefinitelyWritable(int column) throws SQLException {return rsmd.isDefinitelyWritable(column);}

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:   private void extractSQLMetaData( ResultSetMetaData meta )
   7:   {
   8:         ...
   9:         addAttributeToNode(
  10:           meta.isDefinitelyWritable(i) ? S_ISTRUE : S_ISFALSE,
  11:           m_ColAttrib_DEFINITELYWRITABLE_TypeID, lastColHeaderIdx);

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4:         ...
   5:         private int m_origIdx;
   6:         private ResultSetMetaData m_md;
   7:         
   8:         ...
   9:         
  10:         public UnderlyingColumn(ResultSet rs, int idx, int origIdx, ResultSetMetaData md) throws SQLException {
  11:             super(idx, md.getColumnName(origIdx));
  12:         ...
  13:         public boolean isDefinitelyWritable() throws SQLException {
  14:             return m_md.isDefinitelyWritable(m_origIdx);

View Full Code Here

isNullable

public int isNullable(int column)
            throws SQLException
Indicates the nullability of values in the designated column.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
the nullability status of the given column; one of columnNoNulls, columnNullable or columnNullableUnknown
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of isNullable(int column)
   1:       rset = stmt.executeQuery(sql);
   2:       ResultSetMetaData rsmd = rset.getMetaData();
   3: 
   4:         ...
   5:         System.out.print("Is nullable: ");
   6:         switch (rsmd.isNullable(i)) {
   7:         ...
   8:         case ResultSetMetaData.columnNoNulls:
   9:           System.out.println("No Nulls");
  10:         ...
  11:           break;
  12:         case ResultSetMetaData.columnNullable:

View Full Code Here
   1:       rset = stmt.executeQuery(sql);
   2:       ResultSetMetaData rsmd = rset.getMetaData();
   3: 
   4:         ...
   5:         System.out.print("Is nullable: ");
   6:         switch (rsmd.isNullable(i)) {
   7:         ...
   8:         case ResultSetMetaData.columnNoNulls:
   9:           System.out.println("No Nulls");
  10:         ...
  11:           break;
  12:         case ResultSetMetaData.columnNullable:

View Full Code Here
   1: import java.io.Serializable;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6: public class DCResultSetMetaData implements Serializable, ResultSetMetaData {
   7:   
   8:         ...
   9:       currency[i] = false;
  10:       nullable[i] = ResultSetMetaData.columnNoNulls;
  11:       searchable[i] = false;
  12:         ...
  13:       currency[i] = md.isCurrency(j);
  14:       nullable[i] = md.isNullable(j);

View Full Code Here
   1: 
   2:         ResultSetMetaData rsmd = rs.getMetaData();
   3: 
   4:         ...
   5:             logcol.type = rsmd.getColumnTypeName(i);
   6:             logcol.nullable = (rsmd.isNullable(i) == rsmd.columnNullable);
   7:          logcol.isWritable = rsmd.isWritable(i);
   8:          if(!logcol.isWritable) logcol.ignore = true;
   9:          logcols.add(logcol);

View Full Code Here
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11:     
  12:     public int isNullable(int column) throws SQLException {return rsmd.isNullable(column);}

View Full Code Here

isReadOnly

public boolean isReadOnly(int column)
            throws SQLException
Indicates whether the designated column is definitely not writable.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of isReadOnly(int column)
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11:         
  12:     public boolean isReadOnly(int column) throws SQLException {return rsmd.isReadOnly(column);}

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4:         ...
   5:         private int m_origIdx;
   6:         private ResultSetMetaData m_md;
   7:         
   8:         ...
   9:         
  10:         public UnderlyingColumn(ResultSet rs, int idx, int origIdx, ResultSetMetaData md) throws SQLException {
  11:             super(idx, md.getColumnName(origIdx));
  12:         ...
  13:         public boolean isReadOnly() throws SQLException {
  14:             return m_md.isReadOnly(m_origIdx);

View Full Code Here

isSearchable

public boolean isSearchable(int column)
            throws SQLException
Indicates whether the designated column can be used in a where clause.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of isSearchable(int column)
   1: import java.io.Serializable;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6: public class DCResultSetMetaData implements Serializable, ResultSetMetaData {
   7:   
   8:         ...
   9:       currency[i] = false;
  10:       nullable[i] = ResultSetMetaData.columnNoNulls;
  11:       searchable[i] = false;
  12:         ...
  13:       nullable[i] = md.isNullable(j);
  14:       searchable[i] = md.isSearchable(j);

View Full Code Here
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11:         
  12:     public boolean isSearchable(int column) throws SQLException {return rsmd.isSearchable(column);}

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:   private void extractSQLMetaData( ResultSetMetaData meta )
   7:   {
   8:         ...
   9:         addAttributeToNode(
  10:           meta.isSearchable(i) == true ? S_ISTRUE : S_ISFALSE,
  11:           m_ColAttrib_ISSEARCHABLE_TypeID, lastColHeaderIdx);

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4:         ...
   5:         private int m_origIdx;
   6:         private ResultSetMetaData m_md;
   7:         
   8:         ...
   9:         
  10:         public UnderlyingColumn(ResultSet rs, int idx, int origIdx, ResultSetMetaData md) throws SQLException {
  11:             super(idx, md.getColumnName(origIdx));
  12:         ...
  13:         public boolean isSearchable() throws SQLException {
  14:             return m_md.isSearchable(m_origIdx);

View Full Code Here

isSigned

public boolean isSigned(int column)
            throws SQLException
Indicates whether values in the designated column are signed numbers.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of isSigned(int column)
   1: import java.io.Serializable;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6: public class DCResultSetMetaData implements Serializable, ResultSetMetaData {
   7:   
   8:         ...
   9:       currency[i] = false;
  10:       nullable[i] = ResultSetMetaData.columnNoNulls;
  11:       searchable[i] = false;
  12:         ...
  13:       searchable[i] = md.isSearchable(j);
  14:       signed[i] = md.isSigned(j);

View Full Code Here
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11: 
  12:     public boolean isSigned(int column) throws SQLException {return rsmd.isSigned(column);}

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:   private void extractSQLMetaData( ResultSetMetaData meta )
   7:   {
   8:         ...
   9:         addAttributeToNode(
  10:           meta.isSigned(i) ? S_ISTRUE : S_ISFALSE,
  11:           m_ColAttrib_ISSIGNED_TypeID, lastColHeaderIdx);

View Full Code Here
   1: import java.sql.Connection;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5: 
   6:       ResultSetMetaData md = result.getMetaData();
   7: 
   8:         ...
   9:       int maxLength = 0;
  10:       int notNull = md.isNullable(jdbcField) == ResultSetMetaData.columnNullable ? 0 : 1;
  11:       int numeric = JdbcColumnMetaData.isNumeric(jdbcColumnType) ? 1 : 0;
  12:         ...
  13:       String type = result.getFieldType(fieldOffset, jdbcColumnType);
  14:       int unsigned = md.isSigned(jdbcField) ? 0 : numeric;

View Full Code Here
   1:         public int isNullable() throws SQLException {
   2:             return ResultSetMetaData.columnNullableUnknown;
   3:         }
   4:         ...
   5:         private int m_origIdx;
   6:         private ResultSetMetaData m_md;
   7:         
   8:         ...
   9:         
  10:         public UnderlyingColumn(ResultSet rs, int idx, int origIdx, ResultSetMetaData md) throws SQLException {
  11:             super(idx, md.getColumnName(origIdx));
  12:         ...
  13:         public boolean isSigned() throws SQLException {
  14:             return m_md.isSigned(m_origIdx);

View Full Code Here

isWritable

public boolean isWritable(int column)
            throws SQLException
Indicates whether it is possible for a write on the designated column to succeed.
Parameters:
column - the first column is 1, the second is 2, ...
Returns:
true if so; false otherwise
Throws:
SQLException - if a database access error occurs
Usages and Demos :

View More Examples of isWritable(int column)
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:             ResultSet rs = s.getResultSet();
   6:             ResultSetMetaData rsmd = rs.getMetaData();
   7:         ...
   8:             rsmd.isWritable(1);
   9:         } finally {

View Full Code Here
   1:     Vector colNames =new Vector();
   2:     ResultSetMetaData   metaData;
   3: 
   4:         ...
   5:         try {
   6:             return metaData.isWritable(column+1);
   7:         }
   8:         catch (SQLException e) {
   9:             return false;

View Full Code Here
   1: 
   2:         ResultSetMetaData rsmd = rs.getMetaData();
   3: 
   4:         ...
   5:             logcol.nullable = (rsmd.isNullable(i) == rsmd.columnNullable);
   6:          logcol.isWritable = rsmd.isWritable(i);
   7:          if(!logcol.isWritable) logcol.ignore = true;
   8:          logcols.add(logcol);
   9:         }

View Full Code Here
   1: import java.sql.ResultSet;
   2: import java.sql.ResultSetMetaData;
   3: import java.sql.SQLException;
   4:         ...
   5:   private ArrayList rows = new ArrayList();
   6:   private ResultSetMetaData metaData;
   7:   private String communityName;
   8:         ...
   9:     try {
  10:       return metaData.isWritable(column+1);
  11:     }

View Full Code Here
   1: 
   2: public class ResultSetMetaDataForSkyNode implements java.sql.ResultSetMetaData {
   3:         ...
   4:     private ResultSetMetaData rsmd;
   5: 
   6:         ...
   7: 
   8:     public ResultSetMetaDataForSkyNode(StatementForSkyNode st, ResultSetMetaData rsmd) 
   9:         throws SQLException {
  10:         ...
  11: 
  12:     public boolean isWritable(int column) throws SQLException {return rsmd.isWritable(column);}

View Full Code Here