Package org.apache.derby.iapi.sql

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


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

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


   *
   * @return  A ResultDescription for this ResultSetNode.
   */
  public ResultColumnDescriptor[] makeResultDescriptors()
  {
      ResultColumnDescriptor colDescs[] = new ResultColumnDescriptor[size()];
    int size = size();

    for (int index = 0; index < size; index++)
    {
        // the ResultColumn nodes are descriptors, so take 'em...
View Full Code Here

                  normalizedRow.getColumn(whichCol));
          } catch (StandardException se) {
            // Catch illegal null insert and add column info
            if (se.getMessageId().startsWith(SQLState.LANG_NULL_INTO_NON_NULL))
            {
              ResultColumnDescriptor columnDescriptor =
                resultDescription.getColumnDescriptor(whichCol);
              throw
                StandardException.newException(SQLState.LANG_NULL_INTO_NON_NULL,
                                 columnDescriptor.getName());
            }
            //just rethrow if not LANG_NULL_INTO_NON_NULL
            throw se;
          }
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

   *
   * @return  A ResultDescription for this ResultSetNode.
   */
  public ResultColumnDescriptor[] makeResultDescriptors()
  {
      ResultColumnDescriptor colDescs[] = new ResultColumnDescriptor[size()];
    int size = size();

    for (int index = 0; index < size; index++)
    {
        // the ResultColumn nodes are descriptors, so take 'em...
View Full Code Here

                  normalizedRow.getColumn(whichCol));
          } catch (StandardException se) {
            // Catch illegal null insert and add column info
            if (se.getMessageId().startsWith(SQLState.LANG_NULL_INTO_NON_NULL))
            {
              ResultColumnDescriptor columnDescriptor =
                resultDescription.getColumnDescriptor(whichCol);
              throw
                StandardException.newException(SQLState.LANG_NULL_INTO_NON_NULL,
                                 columnDescriptor.getName());
            }
            //just rethrow if not LANG_NULL_INTO_NON_NULL
            throw se;
          }
View Full Code Here

   * @exception SQLException thrown on failure
     *
     */
  public boolean isAutoIncrement(int column) throws SQLException  {

    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 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 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 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

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.