Examples of SQLInteger


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

    public NumberDataValue charLength(NumberDataValue result)
                            throws StandardException
    {
        if (result == null)
        {
            result = new SQLInteger();
        }

        if (this.isNull())
        {
            result.setToNull();
View Full Code Here

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

    {
        int startVal;

        if( result == null )
        {
            result = new SQLInteger();
        }
       
        if( start.isNull() )
        {
            startVal = 1;
View Full Code Here

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

  public final NumberDataValue charLength(NumberDataValue result)
              throws StandardException
  {
    if (result == null)
    {
      result = new SQLInteger();
    }

    if (this.isNull())
    {
      result.setToNull();
View Full Code Here

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

  /*
  ** SQL Operators
  */

    NumberDataValue nullValueInt() {
        return new SQLInteger();
    }
View Full Code Here

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

    ** a SQLInteger is here.  Those extract operations that return
    ** something other than int must allocate the source NumberDataValue
    ** themselves, so that we do not allocate a SQLInteger here.
    */
    if (source == null)
      source = new SQLInteger();

    source.setValue(value);

    return source;
  }
View Full Code Here

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

  public NumberDataValue charLength(NumberDataValue result)
              throws StandardException
  {
    if (result == null)
    {
      result = new SQLInteger();
    }

    if (this.isNull())
    {
      result.setToNull();
View Full Code Here

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

    {
        int startVal;

        if( result == null )
        {
            result = new SQLInteger();
        }
       
        if( start.isNull() )
        {
            startVal = 1;
View Full Code Here

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

                if( !constants.deferred)
                    rs.deleteRow();
                else
                {
                    ExecRow rowId = new ValueRow(1);
                    rowId.setColumn( 1, new SQLInteger( rs.getRow()));
                    rowHolder.insert( rowId);
                }

                rowCount++;
View Full Code Here

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

                static_info,
                dynamic_info);

    // Create a row.
    T_AccessRow r1 = new T_AccessRow(1);
    SQLInteger c1 = new SQLInteger(value);
    r1.setCol(0, c1);

    // Get a location template
    RowLocation rowloc = cc.newRowLocationTemplate();



    // Insert the row and remember its location.
    cc.insertAndFetchLocation(r1.getRowArray(), rowloc);

        // quick test to make sure we can hash insert and find row location.
        Hashtable test_rowloc_hash = new Hashtable();
        test_rowloc_hash.put(rowloc, rowloc);

        RowLocation hash_find = (RowLocation) test_rowloc_hash.get(rowloc);

        if (!hash_find.equals(rowloc))
            throw T_Fail.testFailMsg("(insertAndFetch) bad hash lookup 1");

        hash_find = (RowLocation) test_rowloc_hash.remove(rowloc);

        if (!hash_find.equals(rowloc))
            throw T_Fail.testFailMsg("(insertAndFetch) bad hash lookup 2");

        hash_find = (RowLocation) test_rowloc_hash.remove(rowloc);

        if (hash_find != null)
            throw T_Fail.testFailMsg("(insertAndFetch) bad hash lookup 3");


    // Create a new row of the same type (since the interface expects
    // the callers to be keeping the row types straight), but with
    // a different column value.
    T_AccessRow r2 = new T_AccessRow(1);
    SQLInteger c2 = new SQLInteger(0);
    r2.setCol(0, c2);

    // Fetch the stored value.
    if (!cc.fetch(rowloc, r2.getRowArray(), (FormatableBitSet) null))
        {
      throw T_Fail.testFailMsg("(insertAndFetch) fetch found no row.");
        }

        // Fetch using the fetch partial column interface
        SQLInteger c3 = new SQLInteger(0);
    FormatableBitSet singleColumn = new FormatableBitSet(1);
    singleColumn.set(0);
    DataValueDescriptor[] c3row = new DataValueDescriptor[1];
    c3row[0] = c3;

        if (!cc.fetch(rowloc, c3row, singleColumn))
        {
      throw T_Fail.testFailMsg("(insertAndFetch) fetch found no row.");
        }

    // Close the conglomerate.
    cc.close();

    // Make sure we read back the value we wrote.
    if (c2.getInt() != value)
      throw T_Fail.testFailMsg("(insertAndFetch) Fetched value != inserted value.");

        if (c3.getInt() != value)
      throw T_Fail.testFailMsg("(insertAndFetch) Fetched value != inserted value.");
   
        return true;
  }
View Full Code Here

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

                TransactionController.MODE_RECORD,
                TransactionController.ISOLATION_SERIALIZABLE);

    // Create a row.
    T_AccessRow r1 = new T_AccessRow(1);
    r1.setCol(0, new SQLInteger(value1));

    // Get a location template
    RowLocation rowloc = cc.newRowLocationTemplate();

    // Insert the row and remember its location.
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.