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

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


  private SchemaDescriptor locateSchemaRow(String schemaName,
                TransactionController tc)
    throws StandardException
  {
    DataValueDescriptor      schemaNameOrderable;
    TabInfo            ti = coreInfo[SYSSCHEMAS_CORE_NUM];

    /* Use aliasNameOrderable in both start
     * and stop position for scan.
     */
    schemaNameOrderable = dvf.getVarcharDataValue(schemaName);
View Full Code Here


  private void addDescriptorNow(TupleDescriptor td, TupleDescriptor parent,
                int catalogNumber, boolean duplicatesAllowed,
                TransactionController tc, boolean wait)
    throws StandardException
  {
    TabInfo ti =  (catalogNumber < NUM_CORE) ? coreInfo[catalogNumber] :
      getNonCoreTI(catalogNumber);

    ExecRow row = ti.getCatalogRowFactory().makeRow(td, parent);

    int insertRetCode = ti.insertRow(row, tc, wait);

    if (!duplicatesAllowed)
    {
      if (insertRetCode != TabInfo.ROWNOTDUPLICATE)
        throw duplicateDescriptorException(td, parent);
View Full Code Here

                   int catalogNumber,
                   boolean allowDuplicates,
                   TransactionController tc)
    throws StandardException
  {
    TabInfo ti =  (catalogNumber < NUM_CORE) ? coreInfo[catalogNumber] :
      getNonCoreTI(catalogNumber);
    CatalogRowFactory crf = ti.getCatalogRowFactory();
    RowList rl = new RowList();

    for (int index = 0; index < td.length; index++)
    {
      ExecRow row = crf.makeRow(td[index], parent);
      rl.add(row);
    }

    int insertRetCode = ti.insertRowList( rl, tc );
    if (!allowDuplicates && insertRetCode != TabInfo.ROWNOTDUPLICATE)
    {
      throw duplicateDescriptorException(td[insertRetCode], parent);
    }
  }
View Full Code Here

              TransactionController tc)
    throws StandardException
  {
    ExecIndexRow      keyRow1 = null;
    DataValueDescriptor    schemaNameOrderable;
    TabInfo          ti = coreInfo[SYSSCHEMAS_CORE_NUM];

    if (SanityManager.DEBUG)
    {
      SchemaDescriptor sd = getSchemaDescriptor(schemaName, getTransactionCompile(), true);
      if (!isSchemaEmpty(sd))
      {
        SanityManager.THROWASSERT("Attempt to drop schema "+schemaName+" that is not empty");
      }
    }

    /* Use schemaNameOrderable in both start
     * and stop position for index 1 scan.
     */
    schemaNameOrderable = dvf.getVarcharDataValue(schemaName);

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

    ti.deleteRow( tc, keyRow1, SYSSCHEMASRowFactory.SYSSCHEMAS_INDEX1_ID );
  }
View Full Code Here

        throws StandardException
  {
    DataValueDescriptor      schemaIDOrderable;
    DataValueDescriptor      tableNameOrderable;
    TableDescriptor        td;
    TabInfo            ti = coreInfo[SYSTABLES_CORE_NUM];

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

                    String tableUUID)
        throws StandardException
  {
    DataValueDescriptor      tableIDOrderable;
    TableDescriptor        td;
    TabInfo            ti = coreInfo[SYSTABLES_CORE_NUM];

    /* Use tableNameOrderable and schemaIdOrderable in both start
     * and stop position for scan.
     */
    tableIDOrderable = dvf.getCharDataValue(tableUUID);
View Full Code Here

  {
    ConglomerateController  heapCC;
    ExecIndexRow      keyRow1 = null;
    DataValueDescriptor    schemaIDOrderable;
    DataValueDescriptor    tableNameOrderable;
    TabInfo          ti = coreInfo[SYSTABLES_CORE_NUM];

    /* Use tableIdOrderable and schemaIdOrderable in both start
     * and stop position for index 1 scan.
     */
    tableNameOrderable = dvf.getVarcharDataValue(td.getName());
    schemaIDOrderable = getValueAsDVD(schema.getUUID());

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

    ti.deleteRow( tc, keyRow1, SYSTABLESRowFactory.SYSTABLES_INDEX1_ID );
  }
View Full Code Here

    ConglomerateController  heapCC;
    ExecIndexRow      keyRow1 = null;
    ExecRow            row;
    DataValueDescriptor    schemaIDOrderable;
    DataValueDescriptor    tableNameOrderable;
    TabInfo          ti = coreInfo[SYSTABLES_CORE_NUM];
    SYSTABLESRowFactory  rf = (SYSTABLESRowFactory) ti.getCatalogRowFactory();

    /* Use tableIdOrderable and schemaIdOrderable in both start
     * and stop position for index 1 scan.
     */
    tableNameOrderable = dvf.getVarcharDataValue(td.getName());
    schemaIDOrderable = getValueAsDVD(schema.getUUID());

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

    // build the row to be stuffed into SYSTABLES.
    row = rf.makeRow(td, schema);
    // update row in catalog (no indexes)
    boolean[] bArray = new boolean[2];
    for (int index = 0; index < 2; index++)
    {
      bArray[index] = false;
    }
    ti.updateRow(keyRow1, row,
           SYSTABLESRowFactory.SYSTABLES_INDEX1_ID,
           bArray,
           (int[])null,
           tc);
  }
View Full Code Here

   */
  public ColumnDescriptor getColumnDescriptorByDefaultId(UUID uuid)
        throws StandardException
  {
    DataValueDescriptor  UUIDStringOrderable;
    TabInfo        ti = coreInfo[SYSCOLUMNS_CORE_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
  {
    ColumnDescriptor    cd;
    ColumnDescriptorList    cdlCopy         = new ColumnDescriptorList();
    DataValueDescriptor    refIDOrderable  = null;
    TabInfo                 ti              = coreInfo[SYSCOLUMNS_CORE_NUM];

    /* Use refIDOrderable in both start and stop position for scan. */
    refIDOrderable = getValueAsDVD(uuid);

    /* Set up the start/stop position for the scan */
 
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.