Examples of SQLLongint


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

        throws StandardException
  {
    if (this.parentPageNumber == null)
    {
      // Fault in the page number.
      this.parentPageNumber = new SQLLongint();

            scratch_row[CR_PARENT_COLID] = this.parentPageNumber;

            fetchDesc.setValidColumns(CR_PARENT_BITSET);
            this.page.fetchFromSlot(
View Full Code Here

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

  void setParent(long parent)
        throws StandardException
  {
    // Store the field.
    if (parentPageNumber == null)
      parentPageNumber = new SQLLongint();
    this.parentPageNumber.setValue(parent);

    // Write the field through to the underlying row
        try
        {
View Full Code Here

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

        throws StandardException
  {
    if (this.level == null)
    {
      // Fault in the level
      this.level = new SQLLongint();

            scratch_row[CR_LEVEL_COLID] = this.level;

            fetchDesc.setValidColumns(CR_LEVEL_BITSET);
            this.page.fetchFromSlot(
View Full Code Here

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

  protected void setLevel(int newlevel)
        throws StandardException
  {
    // Store the field.
    if (this.level == null)
      this.level = new SQLLongint();
    this.level.setValue((long) newlevel);

    // Write the field through to the underlying row.
    this.page.updateFieldAtSlot(CR_SLOT, CR_LEVEL_COLID, this.level, null);
  }
View Full Code Here

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

    // convert 1 to true, 0 to false;
       
    if (this.isRoot == null)
    {
      // Fault in the level
      this.isRoot = new SQLLongint();

            scratch_row[CR_ISROOT_COLID] = this.isRoot;

            fetchDesc.setValidColumns(CR_ISROOT_BITSET);
            this.page.fetchFromSlot(
View Full Code Here

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

  {
        // RESOLVE (mmm) - need to store more efficiently //

    // Store the field.
    if (this.isRoot == null)
      this.isRoot = new SQLLongint();

    this.isRoot.setValue((isRoot) ? 1 : 0);

    // Write the field through to the underlying row.
    this.page.updateFieldAtSlot(
View Full Code Here

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

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

        // open a new scan

        ScanController scan =
            tc.openScan(conglomid, false,
                        TransactionController.OPENMODE_FORUPDATE,
                        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

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

  {
    REPORT("start transactionalProperties");

    // put a couple of properties in with different values and types

    tc.setProperty("T_Key_Frog", new SQLLongint(479), false);
    tc.setProperty("T_Key_Tiger", "Roar, ROAR", false);


    long lvalue = ((SQLLongint) (tc.getProperty("T_Key_Frog"))).getLong();
    if (lvalue != 479)
      throw T_Fail.testFailMsg("setProperty() - expected 479 - got " + lvalue);

    String svalue = (String) tc.getProperty("T_Key_Tiger");
    if (!svalue.equals("Roar, ROAR"))
      throw T_Fail.testFailMsg("setProperty() - expected 'Roar, ROAR' - got " + svalue);

    tc.commit();

    // should still be accessable after the commit
    lvalue = ((SQLLongint) (tc.getProperty("T_Key_Frog"))).getLong();
    if (lvalue != 479)
      throw T_Fail.testFailMsg("setProperty() - expected 479 - got " + lvalue);

    svalue = (String) tc.getProperty("T_Key_Tiger");
    if (!svalue.equals("Roar, ROAR"))
      throw T_Fail.testFailMsg("setProperty() - expected 'Roar, ROAR' - got " + svalue);

    tc.commit();

    // see if update works
    tc.setProperty("T_Key_Tiger", "mieow, mieow", false);
    svalue = (String) tc.getProperty("T_Key_Tiger");
    if (!svalue.equals("mieow, mieow"))
      throw T_Fail.testFailMsg("setProperty() - expected 'mieow, mieow' - got " + svalue);

    tc.commit();
    svalue = (String) tc.getProperty("T_Key_Tiger");
    if (!svalue.equals("mieow, mieow"))
      throw T_Fail.testFailMsg("setProperty() - expected 'mieow, mieow' - got " + svalue);

    // see if an update to a different type works
    tc.setProperty("T_Key_Tiger", new SQLLongint(570), false);
    lvalue = ((SQLLongint) (tc.getProperty("T_Key_Tiger"))).getLong();

    if (lvalue != 570)
      throw T_Fail.testFailMsg("setProperty() - expected 570 - got " + lvalue);

    tc.commit();

    lvalue = ((SQLLongint) (tc.getProperty("T_Key_Tiger"))).getLong();
    if (lvalue != 570)
      throw T_Fail.testFailMsg("setProperty() - expected 570 - got " + lvalue);

    tc.commit();

    // delete a key
    tc.setProperty("T_Key_Frog", (Serializable) null, false);
    if (tc.getProperty("T_Key_Frog") != null)
      throw T_Fail.testFailMsg("setProperty() - delete failed");
    tc.commit();

    if (tc.getProperty("T_Key_Frog") != null)
      throw T_Fail.testFailMsg("setProperty() - delete failed");

    tc.commit();

    // now see if rollback works.
    tc.setProperty("T_Key_Tiger", new SQLLongint(457), false);

    tc.abort();
    lvalue = ((SQLLongint) (tc.getProperty("T_Key_Tiger"))).getLong();
    if (lvalue != 570)
      throw T_Fail.testFailMsg("setProperty() - expected 570 - got " + lvalue);
View Full Code Here

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

                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

    // Create a row.
    T_AccessRow row = new T_AccessRow(1);
    SQLLongint col = new SQLLongint(testValue);
    row.setCol(0, col);

    // Stuff in the test value so we can recognize this conglom later.
    cc.insert(row.getRowArray());
View Full Code Here

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);

        sc.close();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.