Examples of DataDescriptorGenerator


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

  {
    int numIndexes = ti.getNumberOfIndexes();

    if (numIndexes > 0)
    {
      DataDescriptorGenerator ddg = getDataDescriptorGenerator();

      for (int indexCtr = 0; indexCtr < numIndexes; indexCtr++)
      {
        initSystemIndexVariables(ddg, ti, indexCtr)
      }
View Full Code Here

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

                    }
                }
            }
        }

    DataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();
        int                             cascadedDrops = cascadedDroppedColumns.size();
    int sizeAfterCascadedDrops = td.getColumnDescriptorList().size() - cascadedDrops;

    // can NOT drop a column if it is the only one in the table
    if (sizeAfterCascadedDrops == 1)
View Full Code Here

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

    private void modifyColumnDefault(int ix)
      throws StandardException            
  {
    ColumnDescriptor columnDescriptor =
      td.getColumnDescriptor(columnInfo[ix].name);
    DataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();
    int columnPosition = columnDescriptor.getPosition();

    // Clean up after the old default, if non-null
    if (columnDescriptor.hasNonNullDefault())
    {
View Full Code Here

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

    // indicate that we are in the process of booting
    booting = true;

    // set only if child class hasn't overriden this already
    if ( dataDescriptorGenerator == null )
    { dataDescriptorGenerator = new DataDescriptorGenerator( this ); }

    if (!create) {


      // SYSTABLES

      coreInfo[SYSTABLES_CORE_NUM].setHeapConglomerate(
          getBootParameter(startParams, CFG_SYSTABLES_ID, true));

      coreInfo[SYSTABLES_CORE_NUM].setIndexConglomerate(SYSTABLESRowFactory.SYSTABLES_INDEX1_ID,
          getBootParameter(startParams, CFG_SYSTABLES_INDEX1_ID, true));


      coreInfo[SYSTABLES_CORE_NUM].setIndexConglomerate(
          SYSTABLESRowFactory.SYSTABLES_INDEX2_ID,
          getBootParameter(startParams, CFG_SYSTABLES_INDEX2_ID, true));

      // SYSCOLUMNS

      coreInfo[SYSCOLUMNS_CORE_NUM].setHeapConglomerate(
          getBootParameter(startParams, CFG_SYSCOLUMNS_ID, true));


      coreInfo[SYSCOLUMNS_CORE_NUM].setIndexConglomerate(
          SYSCOLUMNSRowFactory.SYSCOLUMNS_INDEX1_ID,
          getBootParameter(startParams, CFG_SYSCOLUMNS_INDEX1_ID, true));
      // 2nd syscolumns index added in Xena, hence may not be there
      coreInfo[SYSCOLUMNS_CORE_NUM].setIndexConglomerate(
          SYSCOLUMNSRowFactory.SYSCOLUMNS_INDEX2_ID,
          getBootParameter(startParams, CFG_SYSCOLUMNS_INDEX2_ID, false));

      // SYSCONGLOMERATES

      coreInfo[SYSCONGLOMERATES_CORE_NUM].setHeapConglomerate(
          getBootParameter(startParams, CFG_SYSCONGLOMERATES_ID, true));


      coreInfo[SYSCONGLOMERATES_CORE_NUM].setIndexConglomerate(
          SYSCONGLOMERATESRowFactory.SYSCONGLOMERATES_INDEX1_ID,
          getBootParameter(startParams, CFG_SYSCONGLOMERATES_INDEX1_ID, true));


      coreInfo[SYSCONGLOMERATES_CORE_NUM].setIndexConglomerate(
          SYSCONGLOMERATESRowFactory.SYSCONGLOMERATES_INDEX2_ID,
          getBootParameter(startParams, CFG_SYSCONGLOMERATES_INDEX2_ID, true));

      coreInfo[SYSCONGLOMERATES_CORE_NUM].setIndexConglomerate(
          SYSCONGLOMERATESRowFactory.SYSCONGLOMERATES_INDEX3_ID,
          getBootParameter(startParams, CFG_SYSCONGLOMERATES_INDEX3_ID, true));


      // SYSSCHEMAS
      coreInfo[SYSSCHEMAS_CORE_NUM].setHeapConglomerate(
          getBootParameter(startParams, CFG_SYSSCHEMAS_ID, true));


      coreInfo[SYSSCHEMAS_CORE_NUM].setIndexConglomerate(
          SYSSCHEMASRowFactory.SYSSCHEMAS_INDEX1_ID,
          getBootParameter(startParams, CFG_SYSSCHEMAS_INDEX1_ID, true));

      coreInfo[SYSSCHEMAS_CORE_NUM].setIndexConglomerate(
          SYSSCHEMASRowFactory.SYSSCHEMAS_INDEX2_ID,
          getBootParameter(startParams, CFG_SYSSCHEMAS_INDEX2_ID, true));

    }



    String value = startParams.getProperty(Property.LANG_TD_CACHE_SIZE);
    tdCacheSize = PropertyUtil.intPropertyValue(Property.LANG_TD_CACHE_SIZE, value,
                     0, Integer.MAX_VALUE, Property.LANG_TD_CACHE_SIZE_DEFAULT);

   
    value = startParams.getProperty(Property.LANG_SPS_CACHE_SIZE);
    stmtCacheSize = PropertyUtil.intPropertyValue(Property.LANG_SPS_CACHE_SIZE, value,
                     0, Integer.MAX_VALUE, Property.LANG_SPS_CACHE_SIZE_DEFAULT);

    value = startParams.getProperty(Property.LANG_PERMISSIONS_CACHE_SIZE);
    permissionsCacheSize = PropertyUtil.intPropertyValue(Property.LANG_PERMISSIONS_CACHE_SIZE, value,
                     0, Integer.MAX_VALUE, Property.LANG_PERMISSIONS_CACHE_SIZE_DEFAULT);


    /*
     * data dictionary contexts are only associated with connections.
     * we have to look for the basic data dictionary, as there is
     * no connection, and thus no context stack yet.
     */

    /*
     * Get the table descriptor cache.
     */
    CacheFactory cf =
        (CacheFactory) Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.CacheFactory);
    OIDTdCache =
      cf.newCacheManager(this,
        "TableDescriptorOIDCache",
        tdCacheSize,
        tdCacheSize);
    nameTdCache =
      cf.newCacheManager(this,
        "TableDescriptorNameCache",
        tdCacheSize,
        tdCacheSize);

    if (stmtCacheSize > 0)
    {
      spsNameCache =
        cf.newCacheManager(this,
          "SPSNameDescriptorCache",
          stmtCacheSize,
          stmtCacheSize);
      spsIdHash = new Hashtable(stmtCacheSize);
      // spsTextHash = new Hashtable(stmtCacheSize);
    }


    /* Get the object to coordinate cache transitions */
    cacheCoordinator = new ShExLockable();

    /* Get AccessFactory in order to transaction stuff */
    af = (AccessFactoryMonitor.findServiceModule(this, AccessFactory.MODULE);

    /* Get the lock factory */
    lockFactory = af.getLockFactory();

    /*
     * now we need to setup a context stack for the database creation work.
     * We assume the System boot process has created a context
     * manager already, but not that contexts we need are there.
     */
    ContextService csf = ContextService.getFactory();

    ContextManager cm = csf.getCurrentContextManager();
    if (SanityManager.DEBUG)
      SanityManager.ASSERT((cm != null), "Failed to get current ContextManager");

    // RESOLVE other non-StandardException errors.
    bootingTC = null;
    try
    {
      // Get a transaction controller. This has the side effect of
      // creating a transaction context if there isn't one already.
      bootingTC = af.getTransaction(cm);

      /*
        We need an execution context so that we can generate rows
        REMIND: maybe only for create case?
       */
      exFactory.newExecutionContext(cm);

      DataDescriptorGenerator ddg = getDataDescriptorGenerator();

      //We should set the user schema collation type here now because
      //later on, we are going to create user schema APP. By the time any
      //user schema gets created, we should have the correct collation
      //type set for such schemas to use. For this reason, don't remove
View Full Code Here

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

  public  void  makeCatalog( TabInfoImpl          ti,
                 SchemaDescriptor      sd,
                 TransactionController     tc )
          throws StandardException
  {
    DataDescriptorGenerator ddg = getDataDescriptorGenerator();

    Properties  heapProperties = ti.getCreateHeapProperties();
    ti.setHeapConglomerate(
      createConglomerate(
        ti.getTableName(),
View Full Code Here

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

    long          heapConglomerateNumber
    )
    throws StandardException
  {
    SchemaDescriptor    sd = getSystemSchemaDescriptor( );
    DataDescriptorGenerator ddg = getDataDescriptorGenerator();
    long          indexConglomerateNumber;

    ConglomerateDescriptor  conglomerateDescriptor = bootstrapOneIndex
      ( sd, tc, ddg, ti, indexNumber, heapConglomerateNumber );
View Full Code Here

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

  {
    int numIndexes = ti.getNumberOfIndexes();

    if (numIndexes > 0)
    {
      DataDescriptorGenerator ddg = getDataDescriptorGenerator();

      for (int indexCtr = 0; indexCtr < numIndexes; indexCtr++)
      {
        initSystemIndexVariables(ddg, ti, indexCtr)
      }
View Full Code Here

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

  {
    ColumnDescriptor columnDescriptor   =
      td.getColumnDescriptor(columnInfo[ix].name);
    DataValueDescriptor storableDV;
    int                     colNumber   = td.getMaxColumnID() + ix;
    DataDescriptorGenerator ddg         = dd.getDataDescriptorGenerator();

    /* We need to verify that the table does not have an existing
     * column with the same name before we try to add the new
     * one as addColumnDescriptor() is a void method.
     */
 
View Full Code Here

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

                    SQLState.LANG_COLUMN_NOT_FOUND_IN_TABLE,
                    columnInfo[ix].name,
                    td.getQualifiedName());
    }

    DataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();
    ColumnDescriptorList tab_cdl = td.getColumnDescriptorList();
    int size = tab_cdl.size();

    // can NOT drop a column if it is the only one in the table
    if (size == 1)
View Full Code Here

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

    DependencyManager dm = dd.getDependencyManager();
    TransactionController tc = lcc.getTransactionExecute();

    ColumnDescriptor columnDescriptor =
      td.getColumnDescriptor(columnInfo[ix].name);
    DataDescriptorGenerator ddg = dd.getDataDescriptorGenerator();
    int columnPosition = columnDescriptor.getPosition();

    // Clean up after the old default, if non-null
    if (columnDescriptor.hasNonNullDefault())
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.