Examples of TableDescriptor


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

                    // the table was declared but not dropped in the unit of
                    // work getting rolled back and hence we will remove it
                    // from valid list of temporary tables and drop the
                    // conglomerate associated with it

                    TableDescriptor td = tempTableInfo.getTableDescriptor();

                    //remove the conglomerate created for this temp table
                    tran.dropConglomerate(td.getHeapConglomerateId());

                    //remove it from the list of temp tables
                    allDeclaredGlobalTempTables.remove(i);

                }
                else if (tempTableInfo.getDroppedInSavepointLevel() >=
                            currentSavepointLevel)
                {
                    // the table was declared and dropped in the unit of work
                    // getting rolled back
                    allDeclaredGlobalTempTables.remove(i);
                }
            }
            else if (tempTableInfo.getDroppedInSavepointLevel() >=
                        currentSavepointLevel)
            {
                // this means the table was declared in an earlier savepoint
                // unit / transaction and then dropped in current UOW

                // restore the old definition of temp table because drop is
                // being rolledback
                TableDescriptor td = tempTableInfo.getTableDescriptor();
                td = cleanupTempTableOnCommitOrRollback(td, false);

                // In order to store the old conglomerate information for the
                // temp table, we need to replace the existing table descriptor
                // with the old table descriptor which has the old conglomerate
                // information
                tempTableInfo.setTableDescriptor(td);
                tempTableInfo.setDroppedInSavepointLevel(-1);

                // following will mark the table as not modified. This is
                // because the table data has been deleted as part of the
                // current rollback
                tempTableInfo.setModifiedInSavepointLevel(-1);
                allDeclaredGlobalTempTables.set(i, tempTableInfo);
               
            }
            else if (tempTableInfo.getModifiedInSavepointLevel() >=
                    currentSavepointLevel)
            {
                // this means the table was declared in an earlier savepoint
                // unit / transaction and modified in current UOW

                // following will mark the table as not modified. This is
                // because the table data will be deleted as part of the
                // current rollback
                tempTableInfo.setModifiedInSavepointLevel(-1);
                TableDescriptor td = tempTableInfo.getTableDescriptor();

                getDataDictionary().getDependencyManager().invalidateFor(
                        td, DependencyManager.DROP_TABLE, this);

                cleanupTempTableOnCommitOrRollback(td, true);
View Full Code Here

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

  protected void dropSystemCatalog(TransactionController tc,
               CatalogRowFactory crf)
    throws StandardException
  {
    SchemaDescriptor    sd = bootingDictionary.getSystemSchemaDescriptor();
    TableDescriptor      td = bootingDictionary.getTableDescriptor(
                      crf.getCatalogName(),
                      sd, tc);
    ConglomerateDescriptor[]  cds = td.getConglomerateDescriptors();
    for (int index = 0; index < cds.length; index++)
    {
      tc.dropConglomerate(cds[index].getConglomerateNumber());
    }
    dropSystemCatalogDescription(tc,td);
View Full Code Here

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

        Dependent dep = dependency.getDependent();

        if (affectedCols != null)
        {
          TableDescriptor td = (TableDescriptor) dependency.getProvider();
          FormatableBitSet providingCols = td.getReferencedColumnMap();
          if (providingCols == null)
          {
            if (dep instanceof ViewDescriptor)
            {
              ViewDescriptor vd = (ViewDescriptor) dep;
              SchemaDescriptor compSchema;
              compSchema = dd.getSchemaDescriptor(vd.getCompSchemaId(), null);
              CompilerContext newCC = lcc.pushCompilerContext(compSchema);
              Parser  pa = newCC.getParser();

              // Since this is always nested inside another SQL
              // statement, so topLevel flag should be false
              CreateViewNode cvn = (CreateViewNode)pa.parseStatement(
                        vd.getViewText());

              // need a current dependent for bind
              newCC.setCurrentDependent(dep);
              cvn.bindStatement();
              ProviderInfo[] providerInfos = cvn.getProviderInfo();
              lcc.popCompilerContext(newCC);

              boolean    interferent = false;
              for (int i = 0; i < providerInfos.length; i++)
              {
                Provider provider = null;
                  provider = (Provider) providerInfos[i].
                          getDependableFinder().
                          getDependable(dd,
                          providerInfos[i].getObjectId());
                if (provider instanceof TableDescriptor)
                {
                  TableDescriptor tab = (TableDescriptor)provider;
                  FormatableBitSet colMap = tab.getReferencedColumnMap();
                  if (colMap == null)
                    continue;
                  // if later on an error is raised such as in
                  // case of interference, this dependency line
                  // upgrade will not happen due to rollback
                  tab.setReferencedColumnMap(null);
                  dropDependency(lcc, vd, tab);
                  tab.setReferencedColumnMap(colMap);
                  addDependency(vd, tab, lcc.getContextManager());

                  if (tab.getObjectID().equals(td.getObjectID()))
                  {
                    System.arraycopy(affectedCols.getByteArray(), 0,
                      subsetCols.getByteArray(), 0,
                      affectedCols.getLengthInBytes());
                    subsetCols.and(colMap);
View Full Code Here

Examples of org.apache.hadoop.hbase.TableDescriptor

  @Test
  public void testCreateAndUpdate() throws IOException {
    Path testdir = UTIL.getDataTestDir("testCreateAndUpdate");
    HTableDescriptor htd = new HTableDescriptor(TableName.valueOf("testCreate"));
    TableDescriptor td = new TableDescriptor(htd, TableState.State.ENABLED);
    FileSystem fs = FileSystem.get(UTIL.getConfiguration());
    FSTableDescriptors fstd = new FSTableDescriptors(UTIL.getConfiguration(), fs, testdir);
    assertTrue(fstd.createTableDescriptor(td));
    assertFalse(fstd.createTableDescriptor(td));
    FileStatus [] statuses = fs.listStatus(testdir);
View Full Code Here

Examples of org.apache.ojb.broker.metadata.torque.TableDescriptor

    public TableDescriptorTest(String name) {
        super(name);
    }

    public void setUp() throws Exception {
        this.tableDescriptor = new TableDescriptor();
    }
View Full Code Here

Examples of org.locationtech.udig.catalog.service.database.TableDescriptor

        String table = results.getString(f_table_name);
        String schema = results.getString(f_table_schema);

        boolean broken = isBroken(connection, table, schema, geom,
            geomType);
        tables.add(new TableDescriptor(table, dialect.toGeomClass(geomType), schema, geom,
            srid, broken));

      }

      return tables;
View Full Code Here

Examples of org.qdao.TableDescriptor

   * @param tableClazz
   * @return 2010/02/25 10:41:42
   */
  public static TableDescriptor getTableDescriptor(Class<?> tableClazz) {
    // TODO : use reflect to get annotation from table class
    TableDescriptor tableDescriptor = new TableDescriptor();

    Table table = (Table) tableClazz.getAnnotation(Table.class);
    if (table != null) {
      tableDescriptor.name = table.name();
      tableDescriptor.description = table.description();
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.