Package com.caucho.db.jdbc

Examples of com.caucho.db.jdbc.GeneratedKeysResultSet


   */
  @Override
  public long evalLong(QueryContext context)
    throws SQLException
  {
    GeneratedKeysResultSet keysRS = context.getGeneratedKeysResultSet();

    final TableIterator []rows = context.getTableIterators();
    final TableIterator row = rows[0];
   
    long value = (row.getBlockId() & BlockStore.BLOCK_MASK) + row.getRowOffset();

    if (keysRS != null) {
      keysRS.setColumn(1, _column);
      keysRS.setLong(1, value);
    }

    return value;
  }
View Full Code Here


  {
    if (! _isReturnGeneratedKeys)
      return null;

    if (_generatedKeys == null)
      _generatedKeys = new GeneratedKeysResultSet();

    return _generatedKeys;
  }
View Full Code Here

  public long evalLong(QueryContext context)
    throws SQLException
  {
    long value = _table.nextAutoIncrement(context);

    GeneratedKeysResultSet keysRS = context.getGeneratedKeysResultSet();

    if (keysRS != null) {
      Column column = _table.getAutoIncrementColumn();

      keysRS.setColumn(1, column);
      keysRS.setLong(1, value);
    }

    return value;
  }
View Full Code Here

  public long evalLong(QueryContext context)
    throws SQLException
  {
    long value = _table.nextAutoIncrement(context);

    GeneratedKeysResultSet keysRS = context.getGeneratedKeysResultSet();

    if (keysRS != null) {
      Column column = _table.getAutoIncrementColumn();

      keysRS.setColumn(1, column);
      keysRS.setLong(1, value);
    }

    return value;
  }
View Full Code Here

  {
    if (! _isReturnGeneratedKeys)
      return null;

    if (_generatedKeys == null)
      _generatedKeys = new GeneratedKeysResultSet();

    return _generatedKeys;
  }
View Full Code Here

   * @return the long value
   */
  public long evalLong(QueryContext context)
    throws SQLException
  {
    GeneratedKeysResultSet keysRS = context.getGeneratedKeysResultSet();

    final TableIterator []rows = context.getTableIterators();
    final TableIterator row = rows[0];
   
    long value = (row.getBlockId() & BlockStore.BLOCK_MASK) + row.getRowOffset();

    if (keysRS != null) {
      keysRS.setColumn(1, _column);
      keysRS.setLong(1, value);
    }

    return value;
  }
View Full Code Here

TOP

Related Classes of com.caucho.db.jdbc.GeneratedKeysResultSet

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.