Package org.apache.derby.iapi.sql.dictionary

Examples of org.apache.derby.iapi.sql.dictionary.ColumnDescriptor


    for (int index = 0; index < pdlSize; index++)
    {
      int parameterId = index + 1;

      //RESOLVEAUTOINCREMENT
      ColumnDescriptor cd =
                new ColumnDescriptor(
                    "PARAM" + parameterId,
                    parameterId,  // position
          params[index],
                    ((parameterDefaults == null) || // default
                        (index >= parameterDefaults.length)) ?
View Full Code Here


    int cdlSize = cdl.size();
    DataTypeDescriptor[] params = new DataTypeDescriptor[cdlSize]
    for (int index = 0; index < cdlSize; index++)
    {
      ColumnDescriptor cd = (ColumnDescriptor) cdl.elementAt(index);
      params[index] = cd.getType();
      if (defaults != null)
      {
        defaults.addElement(cd.getDefaultValue());
      }
    }

    return params; 
  }
View Full Code Here

      for (int index = 0; index < params.length; index++)
      {
        int parameterId = index + 1;

      //RESOLVEAUTOINCREMENT
        ColumnDescriptor cd = new ColumnDescriptor("PARAM" + parameterId,
                      parameterId,  // position
                      params[index],
                      ((parameterDefaults == null) || // default
                       (index >= parameterDefaults.length)) ?
                      (DataValueDescriptor)null :
                      (DataValueDescriptor)parameterDefaults[index],
                      (DefaultInfo) null,
                      uuid,
                      (UUID) null,
                      0, 0, 0);
                   
        updateColumnDescriptor(cd,
                     cd.getReferencingUUID(),
                     cd.getColumnName(),
                     columnsToSet,
                     tc,
                     wait);
      }
    }
View Full Code Here

    String columnName;

    TableDescriptor td = getTableDescriptor(rowFactory.getCatalogName(), sd);

    theColumn = columns[columnNumber - 1]// from 1 to 0 based
    ColumnDescriptor cd = makeColumnDescriptor(theColumn, columnNumber, td );
    columnName = cd.getColumnName();
    cd.getType().setNullability(nullability);
    int[] columnNameColArray = new int[1];
    columnNameColArray[0] = SYSCOLUMNSRowFactory.SYSCOLUMNS_COLUMNDATATYPE ;
    updateColumnDescriptor(cd,
                td.getUUID(),
                columnName,
View Full Code Here

                    TransactionController  tc )
          throws StandardException
  {
    int          columnID;
    SystemColumn    currentColumn;
    ColumnDescriptor  cd;

    SystemColumn[]    columns = rowFactory.buildColumnList();
    ExecRow        templateRow = rowFactory.makeEmptyRow();
    int          columnCount = newColumnIDs.length;
    SchemaDescriptor  sd = getSystemSchemaDescriptor();
View Full Code Here

    size = td.getNumberOfColumns();
    RowLocation[] rla = new RowLocation[size];

    for (int i = 0; i < size; i++)
    {
      ColumnDescriptor cd = td.getColumnDescriptor(i + 1);
      if (cd.isAutoincrement())
        rla[i] = computeRowLocation(tc, td, cd.getColumnName());
    }
    return rla;
  }
View Full Code Here

    SystemColumn[]    columnList = crf.buildColumnList();
    UUID        heapUUID = crf.getCanonicalHeapUUID();
    String        heapName = crf.getCanonicalHeapName();
    TableDescriptor    td;
    UUID        toid;
    ColumnDescriptor  cd;
    int          columnCount;
    SystemColumn    column;

    // add table to the data dictionary
View Full Code Here

            int columnPosition,
                            TableDescriptor  td )
            throws StandardException
  {
    //RESOLVEAUTOINCREMENT
    return new ColumnDescriptor
      (column.getName(), columnPosition, column.getType(), null, null, td,
       (UUID) null, // No defaults yet for system columns
       0, 0
       );
  }
View Full Code Here

    valueNode =  (ValueNode) nodeFactory.getNode(C_NodeTypes.UNTYPED_NULL_CONSTANT_NODE,
                               getContextManager());
    for(int index =0 ; index < cdl.size() ; index++)
    {
      ColumnDescriptor cd = (ColumnDescriptor) cdl.elementAt(index);
      //only columns that are nullable need to be set to 'null' for ON
      //DELETE SET NULL
      if((cd.getType()).isNullable())
      {
        resultColumn = (ResultColumn) nodeFactory.getNode(
                         C_NodeTypes.RESULT_COLUMN,
                    cd,
                    valueNode,
View Full Code Here

    valueNode =  (ValueNode) nodeFactory.getNode(C_NodeTypes.UNTYPED_NULL_CONSTANT_NODE,
                               getContextManager());
    for(int index =0 ; index < cdl.size() ; index++)
    {
      ColumnDescriptor cd = (ColumnDescriptor) cdl.elementAt(index);
      //only columns that are nullable need to be set to 'null' for ON
      //DELETE SET NULL
      if((cd.getType()).isNullable())
      {
        resultColumn = (ResultColumn) nodeFactory.getNode(
                         C_NodeTypes.RESULT_COLUMN,
                    cd,
                    valueNode,
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.dictionary.ColumnDescriptor

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.