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

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


   * @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

  {
    ExecIndexRow        keyRow1 = null;
    ExecRow              row;
    DataValueDescriptor      IDOrderable;
    DataValueDescriptor      columnNameOrderable;
    TabInfo            ti = getNonCoreTI(SYSTRIGGERS_CATALOG_NUM);
    SYSTRIGGERSRowFactory      rf = (SYSTRIGGERSRowFactory) ti.getCatalogRowFactory();

    /* Use objectID in both start
     * and stop position for index 1 scan.
     */
    IDOrderable = getValueAsDVD(formerUUID);

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

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

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

    boolean[] bArray = new boolean[3];

    /*
    ** Do we need to update indexes?
    */
    if (colsToSet == null)
    {
      bArray[0] = true;
      bArray[1] = true;
      bArray[2] = true;
    }
    else
    {
      /*
      ** Check the specific columns for indexed
      ** columns.
      */
      for (int i = 0; i < colsToSet.length; i++)
      {
        switch (colsToSet[i])
        {
          case SYSTRIGGERSRowFactory.SYSTRIGGERS_TRIGGERID:
            bArray[0] = true;
            break;

          case SYSTRIGGERSRowFactory.SYSTRIGGERS_TRIGGERNAME:
          case SYSTRIGGERSRowFactory.SYSTRIGGERS_SCHEMAID:
            bArray[1] = true;
            break;
         
          case SYSTRIGGERSRowFactory.SYSTRIGGERS_TABLEID:
            bArray[2] = true;
            break;
        }
      }
    }

    ti.updateRow(keyRow1, row,
           SYSTRIGGERSRowFactory.SYSTRIGGERS_INDEX1_ID,
           bArray,
           colsToSet,
           tc);
  }
View Full Code Here

   */
  public ConstraintDescriptor getConstraintDescriptor(UUID uuid)
        throws StandardException
  {
    DataValueDescriptor    UUIDStringOrderable;
    TabInfo          ti = getNonCoreTI(SYSCONSTRAINTS_CATALOG_NUM);

    /* Use UUIDStringOrderable in both start and stop positions for scan */
    UUIDStringOrderable = dvf.getCharDataValue(uuid.toString());

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

    )
    throws StandardException
  {
    DataValueDescriptor    UUIDStringOrderable;
    DataValueDescriptor    constraintNameOrderable;
    TabInfo          ti = getNonCoreTI(SYSCONSTRAINTS_CATALOG_NUM);

    /* Construct keys for both start and stop positions for scan */
    constraintNameOrderable = dvf.getVarcharDataValue(constraintName);
    UUIDStringOrderable = dvf.getCharDataValue(schemaID.toString());

View Full Code Here

   * @param  td  Table Descriptor for which I need statistics
   */
  public List getStatisticsDescriptors(TableDescriptor td)
    throws StandardException
  {
    TabInfo ti = getNonCoreTI(SYSSTATISTICS_CATALOG_NUM);
    List statDescriptorList = newSList();
    DataValueDescriptor UUIDStringOrderable;

    /* set up the start/stop position for the scan */
    UUIDStringOrderable = dvf.getCharDataValue(td.getUUID().toString());
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.