Package com.caucho.db.index

Examples of com.caucho.db.index.BTree


  void setIndex(Transaction xa,
    byte []block, int rowOffset,
    long rowAddr, QueryContext context)
    throws SQLException
  {
    BTree index = getIndex();

    if (index != null) {
      try {
  index.insert(block,
         rowOffset + _columnOffset, getLength(),
         rowAddr,
         false);
      } catch (SqlIndexAlreadyExistsException e) {
        long blockId = 0;
View Full Code Here


   */
  @Override
  void deleteIndex(Transaction xa, byte []block, int rowOffset)
    throws SQLException
  {
    BTree index = getIndex();

    if (index != null)
      index.remove(block, rowOffset + _columnOffset, getLength());
  }
View Full Code Here

  void setIndex(Transaction xa,
    byte []block, int rowOffset,
    long rowAddr, QueryContext context)
    throws SQLException
  {
    BTree index = getIndex();

    if (index != null) {
      try {
        index.insert(block,
         rowOffset + _columnOffset, getLength(),
         rowAddr,
         false);
      } catch (SqlIndexAlreadyExistsException e) {
  throw new SqlIndexAlreadyExistsException(L.l("StringColumn '{0}.{1}' unique index set failed for {2}\n{3}",
View Full Code Here

   */
  @Override
  void deleteIndex(Transaction xa, byte []block, int rowOffset)
    throws SQLException
  {
    BTree index = getIndex();

    if (index != null)
      index.remove(block, rowOffset + _columnOffset, getLength());
  }
View Full Code Here

  void setIndex(Transaction xa,
    byte []block, int rowOffset,
    long rowAddr, QueryContext context)
    throws SQLException
  {
    BTree index = getIndex();

    if (index != null) {
      try {
  index.insert(block,
         rowOffset + _columnOffset, getLength(),
         rowAddr,
         false);
      } catch (SqlIndexAlreadyExistsException e) {
        long blockId = 0;
View Full Code Here

   */
  @Override
  void deleteIndex(Transaction xa, byte []block, int rowOffset)
    throws SQLException
  {
    BTree index = getIndex();

    if (index != null)
      index.remove(block, rowOffset + _columnOffset, getLength());
  }
View Full Code Here

  void setIndex(Transaction xa,
    byte []block, int rowOffset,
    long rowAddr, QueryContext context)
    throws SQLException
  {
    BTree index = getIndex();

    if (index == null)
      return;

    /*
    IndexCache manager = IndexCache.create();

    manager.insert(index,
       block, rowOffset + getColumnOffset(), getLength(),
       rowAddr,
       xa);
    */
    index.insert(block, rowOffset + getColumnOffset(), getLength(),
     rowAddr, false);
  }
View Full Code Here

   * @param expr the expression to store
   */
  void deleteIndex(Transaction xa, byte []block, int rowOffset)
    throws SQLException
  {
    BTree index = getIndex();

    if (index == null)
      return;

    /*
    IndexCache manager = IndexCache.create();

    manager.delete(index,
       block, rowOffset + getColumnOffset(), getLength(),
       xa);
    */

    index.remove(block, rowOffset + getColumnOffset(), getLength());
  }
View Full Code Here

  void validateIndex(Transaction xa,
                     byte []block, int rowOffset,
                     long rowAddr)
    throws SQLException, IOException
  {
    BTree index = getIndex();

    if (index == null)
      return;

    long value
      = index.lookup(block, rowOffset + getColumnOffset(), getLength());

    if (value != rowAddr)
      throw new IllegalStateException(L.l("invalid index '{0}' at {1}",
                                          value, Long.toHexString(rowAddr)));
  }
View Full Code Here

  /**
   * Cleanup of the column on table shutdown.
   */
  public void close()
  {
    BTree index = _index;
   
    if (index != null)
      index.close();
  }
View Full Code Here

TOP

Related Classes of com.caucho.db.index.BTree

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.