Package org.apache.derby.iapi.types

Examples of org.apache.derby.iapi.types.RowLocation


        long                    conglomid;
        long                    base_conglomid;
        long                    index_conglomid;
        ConglomerateController  base_cc             = null;
        ConglomerateController  index_cc            = null;
        RowLocation             base_rowloc         = null;

        base_row = TemplateRow.newU8Row(3);

        if (init_conglomerate_type.compareTo("BTREE") == 0)
        {
View Full Code Here


          "getPreparedStatement().getSavedObject(itemNumber) expected to be " +
          "instance of RowLocation, not " +
          getPreparedStatement().getSavedObject(itemNumber).getClass().getName() +
          ", query is " + getPreparedStatement().getSource());
      }
      RowLocation rl = (RowLocation) getPreparedStatement().getSavedObject(itemNumber);
      if (! (rl.cloneObject() instanceof RowLocation))
      {
        SanityManager.THROWASSERT(
          "rl.cloneObject() expected to be " +
          "instance of RowLocation, not " +
          rl.getClass().getName() +
          ", query is " + getPreparedStatement().getSource());
      }
    }
    /* We have to return a clone of the saved RowLocation due
     * to the shared cache of SPSs.
View Full Code Here

    if (!indexsc.fetchNext(indexRow))
    {
      return null;
    }
   
    RowLocation baseRowLocation =  (RowLocation) indexRow[1];
    boolean base_row_exists =
            heapCC.fetch(
                baseRowLocation, currentRow.getRowArray(), (FormatableBitSet) null);

        if (SanityManager.DEBUG)
View Full Code Here

                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

    // Create a row.
        T_SecondaryIndexRow template = new T_SecondaryIndexRow();
        RowLocation         row_loc  = base_cc.newRowLocationTemplate();
        template.init(base_row, row_loc, 5);

        // insert them in reverse order just to make sure btree is sorting them
        for (int i = col1.length - 1; i >= 0; i--)
        {
View Full Code Here

                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

    // Create a row.
        T_SecondaryIndexRow template = new T_SecondaryIndexRow();
        RowLocation         row_loc  = base_cc.newRowLocationTemplate();
        template.init(base_row, row_loc, 5);

        // insert them in reverse order just to make sure btree is sorting them
        for (int i = col1.length - 1; i >= 0; i--)
        {
View Full Code Here

                TransactionController.ISOLATION_SERIALIZABLE);

    // objects used to insert rows into base and index tables.
    DataValueDescriptor[] r1            = TemplateRow.newU8Row(2);
        T_SecondaryIndexRow   index_row1    = new T_SecondaryIndexRow();
        RowLocation           base_rowloc1  = base_cc.newRowLocationTemplate();

        index_row1.init(r1, base_rowloc1, 3);

        // insert one row into the table/index
View Full Code Here

        ScanController.GE,              // startSearchOperation
        null,                           //scanQualifier,
        null,                           //stop position-through last row
        ScanController.GT);             // stopSearchOperation

    RowLocation          heapLocation =
            heapScan.newRowLocationTemplate();

    ConglomerateController    indexController =
      tc.openConglomerate(
        indexConglomerateNumber,
View Full Code Here

                TransactionController.OPENMODE_FORUPDATE,
                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

        // initialize the secondary index row - pointing it at base row
        RowLocation base_rowloc = base_cc.newRowLocationTemplate();
        index_row.init(base_row, base_rowloc, num_cols + 1);
       
        // create the secondary index
        Properties properties =
            createProperties(
View Full Code Here

        index_cc.checkConsistency();

    // Create a row and insert into base table, remembering it's location.
    DataValueDescriptor[] r1             = TemplateRow.newU8Row(2);
        T_SecondaryIndexRow  index_row1      = new T_SecondaryIndexRow();
        RowLocation          base_rowloc1    = base_cc.newRowLocationTemplate();

        index_row1.init(r1, base_rowloc1, 3);
    ((SQLLongint) r1[0]).setValue(2);
    ((SQLLongint) r1[1]).setValue(2);

    // Insert the row into the base table and remember its location.
    base_cc.insertAndFetchLocation(r1, base_rowloc1);

        // Insert the row into the secondary index.
        if (index_cc.insert(index_row1.getRow()) != 0)
      throw T_Fail.testFailMsg("insert failed");

    // Make sure we read back the value we wrote from base and index table.
    DataValueDescriptor[] r2            = TemplateRow.newU8Row(2);
        T_SecondaryIndexRow   index_row2    = new T_SecondaryIndexRow();
        RowLocation           base_rowloc2  = base_cc.newRowLocationTemplate();

        index_row2.init(r2, base_rowloc2, 3);

        // base table check:
        if (!base_cc.fetch(base_rowloc1, r2, (FormatableBitSet) null))
View Full Code Here

        index_cc.checkConsistency();

    // Create a row and insert into base table, remembering it's location.
    DataValueDescriptor[]   r1           = TemplateRow.newU8Row(2);
        T_SecondaryIndexRow     index_row1   = new T_SecondaryIndexRow();
        RowLocation             base_rowloc1 = base_cc.newRowLocationTemplate();

        index_row1.init(r1, base_rowloc1, 3);

        // Commit the create of the tables so that the following aborts don't
        // undo that work.
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.types.RowLocation

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.