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

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


  private void dropColumnDescriptorCore(
          TransactionController tc,
          ExecIndexRow keyRow)
      throws StandardException
  {
    TabInfo           ti = coreInfo[SYSCOLUMNS_CORE_NUM];

    ti.deleteRow( tc, keyRow, SYSCOLUMNSRowFactory.SYSCOLUMNS_INDEX1_ID );
  }
View Full Code Here


  {
    ExecIndexRow        keyRow1 = null;
    ExecRow              row;
    DataValueDescriptor      refIDOrderable;
    DataValueDescriptor      columnNameOrderable;
    TabInfo            ti = coreInfo[SYSCOLUMNS_CORE_NUM];
    SYSCOLUMNSRowFactory  rf = (SYSCOLUMNSRowFactory) ti.getCatalogRowFactory();

    /* Use objectID/columnName in both start
     * and stop position for index 1 scan.
     */
    refIDOrderable = getValueAsDVD(formerUUID);
    columnNameOrderable = dvf.getVarcharDataValue(formerName);

    /* Set up the start/stop position for the scan */
    keyRow1 = (ExecIndexRow) exFactory.getIndexableRow(2);
    keyRow1.setColumn(1, refIDOrderable);
    keyRow1.setColumn(2, columnNameOrderable);

    // build the row to be stuffed into SYSCOLUMNS.
    row = rf.makeRow(cd, null);

    /*
    ** Figure out if the index in syscolumns needs
    ** to be updated.
    */
    if (SanityManager.DEBUG)
    {
      SanityManager.ASSERT(rf.getNumIndexes() == 2,
          "There are more indexes on syscolumns than expected, the code herein needs to change");
    }

    boolean[] bArray = new boolean[rf.getNumIndexes()];

    /*
    ** Do we need to update indexes?
    */
    if (colsToSet == null)
    {
      bArray[0] = true;
      bArray[1] = true;
    }
    else
    {
      /*
      ** Check the specific columns for indexed
      ** columns.
      */
      for (int i = 0; i < colsToSet.length; i++)
      {
        if ((colsToSet[i] == rf.SYSCOLUMNS_COLUMNNAME) ||
          (colsToSet[i] == rf.SYSCOLUMNS_REFERENCEID))
        {
          bArray[0] = true;
          break;
        }
        else if (colsToSet[i] == rf.SYSCOLUMNS_COLUMNDEFAULTID)
        {
          bArray[1] = true;
          break;
        }
      }
    }

    ti.updateRow(keyRow1, row,
           SYSCOLUMNSRowFactory.SYSCOLUMNS_INDEX1_ID,
           bArray,
           colsToSet,
           tc,
           wait);
View Full Code Here

  private ViewDescriptor getViewDescriptorScan(TableDescriptor tdi)
    throws StandardException
  {
    ViewDescriptor      vd;
    DataValueDescriptor    viewIdOrderable;
    TabInfo          ti = getNonCoreTI(SYSVIEWS_CATALOG_NUM);
    UUID          viewID = tdi.getUUID();

    /* Use viewIdOrderable in both start
     * and stop position for scan.
     */
 
View Full Code Here

  public void  dropViewDescriptor(ViewDescriptor vd,
                   TransactionController tc)
    throws StandardException
  {
    DataValueDescriptor    viewIdOrderable;
    TabInfo          ti = getNonCoreTI(SYSVIEWS_CATALOG_NUM);

    /* Use aliasNameOrderable in both start
     * and stop position for scan.
     */
    viewIdOrderable = getValueAsDVD(vd.getUUID());

    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = (ExecIndexRow) exFactory.getIndexableRow(1);
    keyRow.setColumn(1, viewIdOrderable);

    ti.deleteRow( tc, keyRow, SYSVIEWSRowFactory.SYSVIEWS_INDEX1_ID );

  }
View Full Code Here

  private FileInfoDescriptor
  getFileInfoDescriptorIndex2Scan(UUID id)
        throws StandardException
  {
    DataValueDescriptor      idOrderable;
    TabInfo            ti = getNonCoreTI(SYSFILES_CATALOG_NUM);
    idOrderable = dvf.getCharDataValue(id.toString());

    /* Set up the start/stop position for the scan */
    ExecIndexRow keyRow = exFactory.getIndexableRow(1);
    keyRow.setColumn(1, idOrderable);
View Full Code Here

                    String name)
        throws StandardException
  {
    DataValueDescriptor      schemaIDOrderable;
    DataValueDescriptor      nameOrderable;
    TabInfo            ti = getNonCoreTI(SYSFILES_CATALOG_NUM);

    nameOrderable = dvf.getVarcharDataValue(name);
    schemaIDOrderable = dvf.getCharDataValue(schemaId.toString());

    /* Set up the start/stop position for the scan */
 
View Full Code Here

            throws StandardException
  {
    ConglomerateController  heapCC;
    ExecIndexRow      keyRow1 = null;
    DataValueDescriptor    idOrderable;
    TabInfo          ti = getNonCoreTI(SYSFILES_CATALOG_NUM);
    TransactionController   tc = getTransactionExecute();
   
    /* Use tableIdOrderable and schemaIdOrderable in both start
     * and stop position for index 1 scan.
     */
    idOrderable = getValueAsDVD(fid.getUUID());

    /* Set up the start/stop position for the scan */
    keyRow1 = (ExecIndexRow) exFactory.getIndexableRow(1);
    keyRow1.setColumn(1, idOrderable);
    ti.deleteRow( tc, keyRow1, SYSFILESRowFactory.SYSFILES_INDEX2_ID );
  }
View Full Code Here

  private SPSDescriptor getSPSDescriptorIndex2Scan(
                    String stmtUUID)
        throws StandardException
  {
    DataValueDescriptor      stmtIDOrderable;
    TabInfo            ti = getNonCoreTI(SYSSTATEMENTS_CATALOG_NUM);

    /* Use stmtIdOrderable in both start
     * and stop position for scan.
     */
    stmtIDOrderable = dvf.getCharDataValue(stmtUUID);
View Full Code Here

                    String schemaUUID)
        throws StandardException
  {
    DataValueDescriptor      schemaIDOrderable;
    DataValueDescriptor      stmtNameOrderable;
    TabInfo            ti = getNonCoreTI(SYSSTATEMENTS_CATALOG_NUM);

    /* Use stmtNameOrderable and schemaIdOrderable in both start
     * and stop position for scan.
     */
    stmtNameOrderable = dvf.getVarcharDataValue(stmtName);
View Full Code Here

    TransactionController  tc,
    boolean wait
  ) throws StandardException
  {
    ExecRow              row;
    TabInfo          ti = getNonCoreTI(SYSSTATEMENTS_CATALOG_NUM);
    SYSSTATEMENTSRowFactory  rf = (SYSSTATEMENTSRowFactory) ti.getCatalogRowFactory();
    int            insertRetCode;

    /*
    ** We must make sure the descriptor is locked
    ** while we are writing it out.  Otherwise,
    ** the descriptor could be invalidated while
    ** we are writing.
    */
    synchronized(descriptor)
    {
      // build the row to be stuffed into SYSSTATEMENTS. this will stuff an
      // UUID into the descriptor
      boolean  compileMe = descriptor.initiallyCompilable();
      row = rf.makeSYSSTATEMENTSrow(compileMe, descriptor);
 
      // insert row into catalog and all its indices
      insertRetCode = ti.insertRow(row, tc, wait);
    }

    // Throw an exception duplicate table descriptor
    if (insertRetCode != TabInfo.ROWNOTDUPLICATE)
    {
View Full Code Here

TOP

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

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.