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

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


  {
    ExecIndexRow        keyRow1 = null;
    ExecRow              row;
    DataValueDescriptor      idOrderable;
    DataValueDescriptor      columnNameOrderable;
    TabInfo            ti = getNonCoreTI(SYSSTATEMENTS_CATALOG_NUM);
    SYSSTATEMENTSRowFactory  rf = (SYSSTATEMENTSRowFactory) ti.getCatalogRowFactory();
    int[] updCols;
    if (recompile)
    {
      if(firstCompilation)
      {
        updCols = new int[] {SYSSTATEMENTSRowFactory.SYSSTATEMENTS_VALID,
                   SYSSTATEMENTSRowFactory.SYSSTATEMENTS_LASTCOMPILED,
                   SYSSTATEMENTSRowFactory.SYSSTATEMENTS_USINGTEXT,
                   SYSSTATEMENTSRowFactory.SYSSTATEMENTS_CONSTANTSTATE,
                   SYSSTATEMENTSRowFactory.SYSSTATEMENTS_INITIALLY_COMPILABLE};
      }else
      {

        updCols = new int[] {SYSSTATEMENTSRowFactory.SYSSTATEMENTS_VALID,
                     SYSSTATEMENTSRowFactory.SYSSTATEMENTS_LASTCOMPILED,
                     SYSSTATEMENTSRowFactory.SYSSTATEMENTS_USINGTEXT,
                     SYSSTATEMENTSRowFactory.SYSSTATEMENTS_CONSTANTSTATE };
      }
    }
    else
    {
      updCols = new int[]  {SYSSTATEMENTSRowFactory.SYSSTATEMENTS_VALID} ;
    }
     
    idOrderable = getValueAsDVD(spsd.getUUID());

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

    row = rf.makeSYSSTATEMENTSrow(false,   // don't compile
                    spsd);

    /*
    ** Not updating any indexes
    */
    boolean[] bArray = new boolean[2];

    /*
    ** Partial update
    */
    ti.updateRow(keyRow1, row,
           SYSSTATEMENTSRowFactory.SYSSTATEMENTS_INDEX1_ID,
           bArray,
           updCols,
           tc,
           wait);
View Full Code Here


   * the boot-up code.
   * @exception StandardException    Thrown on error
   */
  void clearSPSPlans() throws StandardException
  {
    TabInfo ti = getNonCoreTI(SYSSTATEMENTS_CATALOG_NUM);
    faultInTabInfo(ti);

    TransactionController tc = getTransactionExecute();

    FormatableBitSet columnToReadSet = new FormatableBitSet(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_COLUMN_COUNT);
    FormatableBitSet columnToUpdateSet = new FormatableBitSet(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_COLUMN_COUNT);
    columnToUpdateSet.set(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_VALID -1);
    columnToUpdateSet.set(SYSSTATEMENTSRowFactory.SYSSTATEMENTS_CONSTANTSTATE -1);

    DataValueDescriptor[] replaceRow =
            new DataValueDescriptor[SYSSTATEMENTSRowFactory.SYSSTATEMENTS_COLUMN_COUNT];

    /* Set up a couple of row templates for fetching CHARS */

    replaceRow[SYSSTATEMENTSRowFactory.SYSSTATEMENTS_VALID - 1] =
            dvf.getDataValue(false);
    replaceRow[SYSSTATEMENTSRowFactory.SYSSTATEMENTS_CONSTANTSTATE - 1] =
            dvf.getDataValue((Object) null);

    /* Scan the entire heap */
    ScanController sc =
            tc.openScan(
                ti.getHeapConglomerate(),
                false,
                TransactionController.OPENMODE_FORUPDATE,
                TransactionController.MODE_TABLE,
                TransactionController.ISOLATION_REPEATABLE_READ,
                columnToReadSet,
View Full Code Here

    UUID           uuid,
    TransactionController  tc
  ) throws StandardException
  {
    DataValueDescriptor    stmtIdOrderable;
    TabInfo          ti = getNonCoreTI(SYSSTATEMENTS_CATALOG_NUM);

    stmtIdOrderable = getValueAsDVD(uuid);

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

    ti.deleteRow( tc, keyRow, SYSSTATEMENTSRowFactory.SYSSTATEMENTS_INDEX1_ID );

    /* drop all columns in SYSCOLUMNS */ 
    dropAllColumnDescriptors(uuid, tc);
  }
View Full Code Here

   * @exception StandardException    Thrown on failure
   */
  public List getAllSPSDescriptors()
    throws StandardException
  {
    TabInfo          ti = getNonCoreTI(SYSSTATEMENTS_CATALOG_NUM);

    List list = newSList();

    getDescriptorViaHeap(
            (ScanQualifier[][]) null,
View Full Code Here

   * @exception StandardException    Thrown on failure
   */
  private ConstraintDescriptorList getAllConstraintDescriptors()
    throws StandardException
  {
    TabInfo          ti = getNonCoreTI(SYSCONSTRAINTS_CATALOG_NUM);

    ConstraintDescriptorList list = new ConstraintDescriptorList();

    getConstraintDescriptorViaHeap(
            (ScanQualifier[][]) null,
View Full Code Here

   * @exception StandardException    Thrown on failure
   */
  private GenericDescriptorList getAllTriggerDescriptors()
    throws StandardException
  {
    TabInfo          ti = getNonCoreTI(SYSTRIGGERS_CATALOG_NUM);

    GenericDescriptorList list = new GenericDescriptorList();

    getDescriptorViaHeap(
            (ScanQualifier[][]) null,
View Full Code Here

   * @exception StandardException    Thrown on failure
   */
  public TriggerDescriptor getTriggerDescriptor(UUID uuid)
        throws StandardException
  {
    TabInfo            ti = getNonCoreTI(SYSTRIGGERS_CATALOG_NUM);
    DataValueDescriptor triggerIdOrderable = dvf.getCharDataValue(uuid.toString());

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

  public TriggerDescriptor getTriggerDescriptor(String name, SchemaDescriptor sd)
        throws StandardException
  {
    DataValueDescriptor      schemaIDOrderable;
    DataValueDescriptor      triggerNameOrderable;
    TabInfo            ti = getNonCoreTI(SYSTRIGGERS_CATALOG_NUM);

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

   private void getTriggerDescriptorsScan(TableDescriptor td, boolean forUpdate)
      throws StandardException
  {
    GenericDescriptorList    gdl = (td).getTriggerDescriptorList();
    DataValueDescriptor    tableIDOrderable = null;
    TabInfo          ti = getNonCoreTI(SYSTRIGGERS_CATALOG_NUM);

    /* Use tableIDOrderable in both start and stop positions for scan */
    tableIDOrderable = getValueAsDVD(td.getUUID());

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

    TriggerDescriptor     descriptor,
    TransactionController   tc
  ) throws StandardException
  {
    DataValueDescriptor    idOrderable;
    TabInfo          ti = getNonCoreTI(SYSTRIGGERS_CATALOG_NUM);

    idOrderable = getValueAsDVD(descriptor.getUUID());

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

    ti.deleteRow(tc, keyRow, SYSTRIGGERSRowFactory.SYSTRIGGERS_INDEX1_ID);
  }
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.