Package org.apache.derby.iapi.types

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


      null, 0, null, null, 0);

    // Create the template for the index. This method "knows" that
    // all rows in the base table have one IntCol
    T_AccessRow template = new T_AccessRow(2);
    SQLLongint col0 = new SQLLongint(0);
    RowLocation col1 = sc.newRowLocationTemplate();
    template.setCol(0, col0);
    template.setCol(1, col1);

    DataValueDescriptor[] baseRow = new DataValueDescriptor[1];
View Full Code Here


      null, // stop position - last row in conglomerate
            0);   // unused if stop position is null.

    // An empty row
    T_AccessRow row = new T_AccessRow(1);
    SQLLongint col = new SQLLongint(0);
    row.setCol(0, col);

    // Iterate through and check that the rows are still there.
    // Note this part of the test will inten
    int nrows = 0;
View Full Code Here

                TransactionController.ISOLATION_SERIALIZABLE);

        // insert 5 rows

        T_AccessRow r1        = null;
    SQLLongint c1   = null;

        for (int i = 1; i < 5; i++)
        {
            // Create a row.
            r1  = new T_AccessRow(1);
            c1  = new SQLLongint(i);
            r1.setCol(0, c1);

            // Get a location template
            RowLocation rowloc = cc.newRowLocationTemplate();
View Full Code Here

        T_AccessRow  accessRow  = null;
        for (int i = 1; i < 5; i++)
        {
            // Create a row.
            accessRow  = new T_AccessRow(1);
            SQLLongint c1  = new SQLLongint(i);
            accessRow.setCol(0, c1);
           
            // Insert the row and remember its location.
            cc.insert(accessRow.getRowArray());
        }
View Full Code Here

    }

    currentRow = rowArray[0].getNewNullRow();
    indexRow = new DataValueDescriptor[2];
    indexRow[0] = new SQLLongint(position);
    indexRow[1] =   heapCC.newRowLocationTemplate();

    DataValueDescriptor[] searchRow =  new DataValueDescriptor[1];
    searchRow[0] = new SQLLongint(position);

    if(indexsc == null)
    {
      indexsc = tc.openScan(positionIndexConglomId,
                  false,                           // don't hold open across commit
View Full Code Here

  {
    if(!positionIndexCreated)
    {
      TransactionController tc = activation.getTransactionController();
      int numKeys = 2;
      position_sqllong = new SQLLongint();
      positionIndexRow = new DataValueDescriptor[numKeys];
      positionIndexRow[0] = position_sqllong;
      positionIndexRow[1] = rl;       
      Properties props = makeIndexProperties(positionIndexRow, CID);
      positionIndexConglomId =
View Full Code Here

      // SYSCOLUMNS and immediately re-added with a different
      // column position (to account for the dropped column).
      // In this case, the autoincValue may have a
      // different value than the autoincStart.
      row.setColumn(SYSCOLUMNS_AUTOINCREMENTVALUE,
              new SQLLongint(autoincValue));
      row.setColumn(SYSCOLUMNS_AUTOINCREMENTSTART,
              new SQLLongint(autoincStart));
      row.setColumn(SYSCOLUMNS_AUTOINCREMENTINC,
              new SQLLongint(autoincInc));
    } else if (autoinc_create_or_modify_Start_Increment == ColumnDefinitionNode.MODIFY_AUTOINCREMENT_RESTART_VALUE)
    {//user asked for restart with a new value, so don't change increment by and original start
      //with values in the SYSCOLUMNS table. Just record the RESTART WITH value as the
      //next value to be generated in the SYSCOLUMNS table
      ColumnDescriptor  column = (ColumnDescriptor)td;
      row.setColumn(SYSCOLUMNS_AUTOINCREMENTVALUE, new SQLLongint(autoincStart));
      row.setColumn(SYSCOLUMNS_AUTOINCREMENTSTART, new SQLLongint(autoincStart));
      row.setColumn(SYSCOLUMNS_AUTOINCREMENTINC, new SQLLongint(
          column.getTableDescriptor().getColumnDescriptor(colName).getAutoincInc()));
    }
    else
    {
      row.setColumn(SYSCOLUMNS_AUTOINCREMENTVALUE,
              new SQLLongint());
      row.setColumn(SYSCOLUMNS_AUTOINCREMENTSTART,
              new SQLLongint());
      row.setColumn(SYSCOLUMNS_AUTOINCREMENTINC,
              new SQLLongint());
    }
    return row;
  }
View Full Code Here

    }

    currentRow = rowArray[0].getNewNullRow();
    indexRow = new DataValueDescriptor[2];
    indexRow[0] = new SQLLongint(position);
    indexRow[1] =   heapCC.newRowLocationTemplate();

    DataValueDescriptor[] searchRow =  new DataValueDescriptor[1];
    searchRow[0] = new SQLLongint(position);

    if(indexsc == null)
    {
      indexsc = tc.openScan(positionIndexConglomId,
                  false,                           // don't hold open across commit
View Full Code Here

  {
    if(!positionIndexCreated)
    {
      TransactionController tc = activation.getTransactionController();
      int numKeys = 2;
      position_sqllong = new SQLLongint();
      positionIndexRow = new DataValueDescriptor[numKeys];
      positionIndexRow[0] = position_sqllong;
      positionIndexRow[1] = rl;       
      Properties props = makeIndexProperties(positionIndexRow, CID);
      positionIndexConglomId =
View Full Code Here

    long                    conglomid,
    DataValueDescriptor[]   search_key,
    boolean useUpdateLocks)
        throws StandardException
    {
        SQLLongint column0 = new SQLLongint(-1);
        SQLLongint column1 = new SQLLongint(-1);

        int openmode = TransactionController.OPENMODE_FORUPDATE;
        if (useUpdateLocks) {
            openmode |= TransactionController.OPENMODE_USE_UPDATE_LOCKS;
        }

        // open a new scan

        ScanController scan =
            tc.openScan(conglomid, false,
                        openmode,
                        TransactionController.MODE_RECORD,
                        TransactionController.ISOLATION_SERIALIZABLE,
                        (FormatableBitSet) null,
                        search_key, ScanController.GE,
                        null,
                        search_key, ScanController.GT);

        long expect_key =
            ((SQLLongint) search_key[1]).getLong();

        int numrows = 0;
    DataValueDescriptor[] partialRow = new DataValueDescriptor[2];
    partialRow[0] = column0;
    partialRow[1] = column1;

        while (scan.next())
        {
            numrows++;

      scan.fetch(partialRow);

            if (column0.getLong() != 1)
                return(FAIL("(t_delete) column[0] value is not 1"));

            if (column1.getLong() != expect_key)
                return(
                    FAIL("(t_delete) column[1]  value is not " + expect_key));

            if (!scan.delete())
            {
View Full Code Here

TOP

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

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.