Examples of BTree

The first reference was used to implement this class.

TODO: clean up code @author Arjohn Kampman @author Enrico Minack

  • uk.ac.open.kmi.smartproducts.sesame.sail.btree.BTree
    tvincent.edu/swd/btree/btree.html
  • ,
  • http://bluerwhite.org/btree/
  • , and
  • http://semaphorecorp.com/btp/algo.html
  • . The first reference was used to implement this class.

    TODO: clean up code @author Arjohn Kampman @author Enrico Minack

  • xbird.storage.index.BTree
    BTree represents a Variable Magnitude Simple-Prefix B+Tree File.
    @author Makoto YUI (yuin405+xbird@gmail.com)

  • Examples of com.caucho.db.index.BTree

      void setIndex(DbTransaction 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

    Examples of com.caucho.db.index.BTree

       * @param expr the expression to store
       */
      void deleteIndex(DbTransaction 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

    Examples of com.caucho.db.index.BTree

      void validateIndex(DbTransaction 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

    Examples of com.caucho.db.index.BTree

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

    Examples of com.caucho.db.index.BTree

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

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

    Examples of com.caucho.db.index.BTree

      public void validate(TableIterator []sourceRows,
                           QueryContext queryContext, DbTransaction xa)
        throws SQLException
      {
        Column column = _uniqueColumn;
        BTree index = column.getIndex();

        if (index != null) {
          validateIndex(sourceRows, queryContext, xa);
          return;
        }
    View Full Code Here

    Examples of com.caucho.db.index.BTree

          TableIterator sourceRow = sourceRows[0];

          byte []sourceBuffer = sourceRow.getBuffer();
          int sourceOffset = sourceRow.getRowOffset();
         
          BTree index = column.getIndex();

          /*
          int length = column.evalToBuffer(sourceBuffer, sourceOffset,
                                           buffer, 0);

          if (length <= 0)
            return;

          long value = index.lookup(buffer, 0, length,
                                    context.getTransaction());

          */

          // currently this is a static length.  See StringColumn.
          int length = column.getLength();
          int offset = sourceOffset + _uniqueColumn.getColumnOffset();
          long value = index.lookup(sourceBuffer, offset, length);

          if (value != 0) {
            Table table = sourceRow.getTable();
            long blockId = sourceRow.getBlockId();

    View Full Code Here

    Examples of com.caucho.db.index.BTree

          int length = _column.getLength();

          if (length <= 0)
            return;

          BTree index = _column.getIndex();

          long value = index.lookup(buffer, 0, length);

          if (value != 0) {
            Table table = sourceRow.getTable();
            long blockId = sourceRow.getBlockId();
    View Full Code Here

    Examples of com.caucho.db.index.BTree

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

        if (index == null)
          return;

        index.insert(block, rowOffset + _columnOffset, 2, rowAddr, false);
      }
    View Full Code Here

    Examples of com.caucho.db.index.BTree

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

        if (index != null)
          index.remove(block, rowOffset + _columnOffset, 2);
      }
    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.