Package org.apache.derby.iapi.sql

Examples of org.apache.derby.iapi.sql.ResultColumnDescriptor


        DataTypeDescriptor[]    result = new DataTypeDescriptor[ count ];
       
        for ( int i = 1; i <= count; i++)
        {
            ResultColumnDescriptor  colDesc = desc.getColumnDescriptori );
            DataTypeDescriptor dtd = colDesc.getType();

            result[i - 1] = dtd;
        }

        return result;
View Full Code Here


      bulkInsertCounters = new BulkInsertCounter[ rla.length ];
      for (int i = 0; i < resultDescription.getColumnCount(); i++)
      {
        if (rla[i] == null)
          continue;
        ResultColumnDescriptor rcd =
          resultDescription.getColumnDescriptor(i + 1);
        aiCache[i] = rcd.getType().getNull();
      }
    }

    if (insertMode != null)
    {
View Full Code Here

        // first count the number of generated columns
        for ( int i = 1; i <= columnCount; i++ )
        {
            if ( i < firstColumn ) { continue; }
           
            ResultColumnDescriptor  rcd = resultDescription.getColumnDescriptor( i );

            if ( rcd.hasGenerationClause() ) { generatedColumnCount++; }
        }

        // now allocate and populate support structures
        generatedColumnPositions = new int[ generatedColumnCount ];
        normalizedGeneratedValues = new DataValueDescriptor[ generatedColumnCount ];

        int     idx = 0;
        for ( int i = 1; i <= columnCount; i++ )
        {
            if ( i < firstColumn ) { continue; }
           
            ResultColumnDescriptor  rcd = resultDescription.getColumnDescriptor( i );

            if ( rcd.hasGenerationClause() )
            {
                generatedColumnPositions[ idx ] = i;
                normalizedGeneratedValues[ idx ] = emptyRow.getColumn( i );

                idx++;
View Full Code Here

   * @exception SQLException thrown on failure
     *
     */
  public final boolean isAutoIncrement(int column) throws SQLException  {
        validColumnNumber(column);
    ResultColumnDescriptor rcd = columnInfo[column - 1];
    return rcd.isAutoincrement();
  }
View Full Code Here

     * @param column the first column is 1, the second is 2, ...
     * @return true if so
   * @exception SQLException thrown on failure
     */
  public final String getColumnLabel(int column) throws SQLException {
    ResultColumnDescriptor cd = columnInfo[column - 1];
    String s = cd.getName();

    // we could get fancier than this, but it's simple
      return (s==null? "Column"+Integer.toString(column) : s);
  }
View Full Code Here

     * @param column the first column is 1, the second is 2, ...
     * @return column name
   * @exception SQLException thrown on failure
     */
  public final String getColumnName(int column) throws SQLException  {
    ResultColumnDescriptor cd = columnInfo[column - 1];
    String s = cd.getName();
    // database returns null when no column name to differentiate from empty name
      return (s==null? "" : s);

  }
View Full Code Here

     * @param column the first column is 1, the second is 2, ...
     * @return schema name or "" if not applicable
   * @exception SQLException thrown on failure
     */
  public final String getSchemaName(int column) throws SQLException  {
    ResultColumnDescriptor cd = columnInfo[column - 1];

    String s = cd.getSourceSchemaName();
    // database returns null when no schema name to differentiate from empty name
    return (s==null? "" : s);
  }
View Full Code Here

     *
     * @return table name or "" if not applicable
   * @exception SQLException thrown on failure
     */
  public final String getTableName(int column) throws SQLException {
    ResultColumnDescriptor cd = columnInfo[column - 1];
    String s = cd.getSourceTableName();

    // database returns null when no table name to differentiate from empty name
    return (s==null? "" : s);
  }
View Full Code Here

  private DataTypeDescriptor getColumnTypeDescriptor(int column) throws SQLException
  {
    validColumnNumber(column);

    ResultColumnDescriptor cd = columnInfo[column - 1];

    return cd.getType();
  }
View Full Code Here

        {
            cachedDestinations = new DataValueDescriptor[ count ];
            for ( int i = 0; i < count; i++)
            {
                int         position = i + 1;
                ResultColumnDescriptor  colDesc = resultDescription.getColumnDescriptor( position );
                cachedDestinations[ i ] = colDesc.getType().getNull();
            }
        }

        for ( int i = 0; i < count; i++ )
        {
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.ResultColumnDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.