Package org.apache.derby.iapi.types

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


    if (rh0 == null)
      throw T_Fail.testFailMsg("insert of first long row failed.");
    else {
      REPORT("about to check fetch...");
      DataValueDescriptor column = new SQLChar();
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 0, column, false, REC_001, colSize);
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 1, column, false, REC_002, colSize);
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 2, column, false, REC_003, colSize);
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 3, column, false, REC_004, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 4, column, false, REC_005, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 5, column, false, REC_009, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 6, column, false, REC_010, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 7, column, false, REC_011, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 8, column, false, REC_012, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 9, column, false, REC_013, colSize);
    }

       t_util.t_commit(t);


        // update col 5 (the 6th column, the first column on the 2nd overflow page), which causes
        // the last column (col 9, the 10th column) to move off the page.

        c = t_util.t_openContainer(t, segment, cid, true);
    page = t_util.t_getPage(c, ContainerHandle.FIRST_PAGE_NUMBER);

    T_RawStoreRow updateRow = new T_RawStoreRow(10);
    for (int i = 0; i < 10; i++)
      updateRow.setColumn(i, (String) null);
        updateRow.setColumn(5, colSize*2, REC_009);
    FormatableBitSet colList = new FormatableBitSet(10);
    colList.set(5);
    page.updateAtSlot(0, updateRow.getRow(), colList);

        REPORT("about to check fetch after update ...");
        DataValueDescriptor column = new SQLChar();
        t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 0, column, false, REC_001, colSize);
        t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 1, column, false, REC_002, colSize);
        t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 2, column, false, REC_003, colSize);
        t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 3, column, false, REC_004, colSize);
        t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 4, column, false, REC_005, colSize);
View Full Code Here


    if (rh0 == null)
      throw T_Fail.testFailMsg("insert of first long row failed.");
    else {
      REPORT("about to check fetch...");
      DataValueDescriptor column = new SQLChar();
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 0, column, false, REC_001, colSize);
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 1, column, false, REC_002, colSize);
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 2, column, false, REC_003, colSize);
      t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 3, column, false, REC_004, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 4, column, false, REC_005, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 5, column, false, REC_009, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 6, column, false, REC_010, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 7, column, false, REC_011, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 8, column, false, REC_012, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 9, column, false, REC_013, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 10, column, false, REC_014, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 11, column, false, REC_015, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 12, column, false, REC_016, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 13, column, false, REC_017, colSize);
            t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 14, column, false, REC_018, colSize);
    }

       t_util.t_commit(t);


        // update col 5 (the 6th column, the first column on the 2nd overflow page), which causes
        // the last column (col 9, the 10th column) to move off the page.

        c = t_util.t_openContainer(t, segment, cid, true);
    page = t_util.t_getPage(c, ContainerHandle.FIRST_PAGE_NUMBER);

    T_RawStoreRow updateRow = new T_RawStoreRow(15);
    for (int i = 0; i < 15; i++)
      updateRow.setColumn(i, (String) null);
        updateRow.setColumn(5, colSize*2, REC_009);
    FormatableBitSet colList = new FormatableBitSet(15);
    colList.set(5);
    page.updateAtSlot(0, updateRow.getRow(), colList);

        REPORT("about to check fetch after update ...");
        DataValueDescriptor column = new SQLChar();
        t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 0, column, false, REC_001, colSize);
        t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 1, column, false, REC_002, colSize);
        t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 2, column, false, REC_003, colSize);
        t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 3, column, false, REC_004, colSize);
        t_util.t_checkFetchColFromSlot(page, page.FIRST_SLOT_NUMBER, 4, column, false, REC_005, colSize);
View Full Code Here

        r2 = page.updateAtSlot(1, upd2.getRow(), (FormatableBitSet) null);
      }

      t_util.t_checkFetch(page, r1, upd1);
      // first row should contain (null, REC_003, REC_004)
      DataValueDescriptor column = new SQLChar();

    //         page, slot, field, column, forUpdate, data
      t_util.t_checkFetchColFromSlot(page, 0, 0, column, true, null);
      t_util.t_checkFetchColFromSlot(page, 0, 1, column, true, REC_003);
      t_util.t_checkFetchColFromSlot(page, 0, 2, column, true, REC_004);
View Full Code Here

    // first row should contain (null, REC_003, REC_004)

      t_util.t_checkFieldCount(page, 0, 3);

      DataValueDescriptor column = new SQLChar();
      t_util.t_checkFetchColFromSlot(page, 0, 0, column, false, null);
      t_util.t_checkFetchColFromSlot(page, 0, 1, column, false, REC_003);
      t_util.t_checkFetchColFromSlot(page, 0, 2, column, false, REC_004);

      if (recordCount == 2)
View Full Code Here

      row.setColumn(4, REC_005);
   

      RecordHandle rh = t_util.t_insert(page, row);

      DataValueDescriptor col0 = new SQLChar(null);
      DataValueDescriptor col1 = new SQLChar(REC_001);
      DataValueDescriptor col2 = new SQLChar(REC_002);
      DataValueDescriptor col3 = new SQLChar(null);

      if (page.updateFieldAtSlot(page.FIRST_SLOT_NUMBER, 0, col0, null) == null ||
        page.updateFieldAtSlot(page.FIRST_SLOT_NUMBER, 1, col1, null) == null ||
        page.updateFieldAtSlot(page.FIRST_SLOT_NUMBER, 2, col2, null) == null ||
        page.updateFieldAtSlot(page.FIRST_SLOT_NUMBER, 3, col3, null) == null)
View Full Code Here

    {
      ContainerHandle c = t_util.t_openContainer(t, 0, cid, false);
      Page page = t_util.t_getPage(c, ContainerHandle.FIRST_PAGE_NUMBER);

      // first row should contain (null, REC_001, REC_002, null, REC_005)
      DataValueDescriptor column = new SQLChar();
      t_util.t_checkFetchColFromSlot(page, 0, 0, column, false, null);
      t_util.t_checkFetchColFromSlot(page, 0, 1, column, false, REC_001);
      t_util.t_checkFetchColFromSlot(page, 0, 2, column, false, REC_002);
      t_util.t_checkFetchColFromSlot(page, 0, 3, column, false, null);
      t_util.t_checkFetchColFromSlot(page, 0, 4, column, false, REC_005);
View Full Code Here

          t_util.t_checkRecordCount(page, 1, 1);

        t_util.t_checkFieldCount(page, 0, 2);

        // each row has REC_005, REC_004
        DataValueDescriptor column = new SQLChar();
        t_util.t_checkFetchColFromSlot(page, 0, 0, column, false, REC_005);
        t_util.t_checkFetchColFromSlot(page, 0, 1, column, false, REC_004);
        page.unlatch();
      }
View Full Code Here

        c = t_util.t_openContainer(t, 0, cid[i], false);
        page = t_util.t_getPage(c, ContainerHandle.FIRST_PAGE_NUMBER);
        t_util.t_checkRecordCount(page, 1, 0);

        // record has the following fields: REC_001, REC_002, null
        DataValueDescriptor column = new SQLChar();
        t_util.t_checkFetchColFromSlot(page, 0, 0, column, false, REC_001);
        t_util.t_checkFetchColFromSlot(page, 0, 1, column, false, REC_002);
        t_util.t_checkFetchColFromSlot(page, 0, 2, column, false, null);
      }
    }
View Full Code Here

            tableID = cpd.getTableUUID().toString();
            type = cpd.getType();
            columns = cpd.getColumns();
        }
        ExecRow row = getExecutionFactory().getValueRow( COLUMN_COUNT);
        row.setColumn( COLPERMSID_COL_NUM, new SQLChar(colPermID));
        row.setColumn( GRANTEE_COL_NUM, grantee);
        row.setColumn( GRANTOR_COL_NUM, grantor);
        row.setColumn( TABLEID_COL_NUM, new SQLChar(tableID));
        row.setColumn( TYPE_COL_NUM, new SQLChar(type));
        row.setColumn( COLUMNS_COL_NUM, dvf.getDataValue( (Object) columns));
        return row;
    } // end of makeRow
View Full Code Here

            // permissions.
            row = getExecutionFactory().getIndexableRow( 3);
            row.setColumn(1, getAuthorizationID( perm.getGrantee()));
            ColPermsDescriptor colPerms = (ColPermsDescriptor) perm;
            String tableUUIDStr = colPerms.getTableUUID().toString();
            row.setColumn(2, new SQLChar(tableUUIDStr));
            row.setColumn(3, new SQLChar(colPerms.getType()));
            break;
        case COLPERMSID_INDEX_NUM:
            row = getExecutionFactory().getIndexableRow( 1);
            String colPermsUUIDStr = perm.getObjectID().toString();
            row.setColumn(1, new SQLChar(colPermsUUIDStr));
            break;
        case TABLEID_INDEX_NUM:
            row = getExecutionFactory().getIndexableRow( 1);
            colPerms = (ColPermsDescriptor) perm;
            tableUUIDStr = colPerms.getTableUUID().toString();
            row.setColumn(1, new SQLChar(tableUUIDStr));
            break;
        }
        return row;
    } // end of buildIndexKeyRow
View Full Code Here

TOP

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

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.