# DbMultipleDataIterator |

`

###

    import com.sleepycat.db.*;

    public class DbMultipleDataIterator
    {
    	public DbMultipleDataIterator(Dbt data);

    	public boolean next(Dbt data);
    }

    public class DbMultipleKeyDataIterator
    {
    	public DbMultipleKeyDataIterator(Dbt data);

    	public boolean next(Dbt key, Dbt data);
    }

    public class DbMultipleRecnoDataIterator
    {
    	public DbMultipleRecnoDataIterator(Dbt data);

    	public boolean next(Dbt key, Dbt data);
    }

# Description

If either of the Db.DB_MULTIPLE or Db.DB_MULTIPLE_KEY flags were specified to the Db.get or Dbc.get method, the data Dbt returned by those interfaces will refer to a buffer that is filled with data. Access to that data is through the following classes.

All instances of the bulk retrieval classes may be used only once, and to traverse the bulk retrieval buffer in the forward direction only. However, they are nondestructive, so multiple iterators can be instantiated and used on the same returned data Dbt.

DbMultipleDataIterator
  This class is used to iterate through data returned using the Db.DB_MULTIPLE flag from a database belonging to any access method. The constructor takes the data Dbt returned by the call to Db.get or Dbc.get that used the Db.DB_MULTIPLE flag. The next() method takes a Dbt that will be filled in with a reference to a buffer, a size, and an offset that together yield the next data item in the original bulk retrieval buffer. The next() method returns false if no more data are available, and true otherwise.

DbMultipleKeyDataIterator
  This class is used to iterate through data returned using the Db.DB_MULTIPLE_KEY flag from a database belonging to the Btree or Hash access methods. The constructor takes the data Dbt returned by the call to Db.get or Dbc.get that used the Db.DB_MULTIPLE_KEY flag. The next() method takes two Dbts, one for a key and one for a data item, that will each be filled in with a reference to a buffer, a size, and an offset that together yield the next key or data item in the original bulk retrieval buffer. The next() method returns false if no more data are available, and true otherwise.

DbMultipleRecnoDataIterator
  This class is used to iterate through data returned using the Db.DB_MULTIPLE_KEY flag from a database belonging to the Recno or Queue access methods. The constructor takes the data Dbt returned by the call to Db.get or Dbc.get that used the Db.DB_MULTIPLE_KEY flag. The next() method takes two Dbts, one for a key and one for a data item, that will each be filled in with a reference to a buffer, a size, and an offset that together yield the next key or data item in the original bulk retrieval buffer. The record number contained in the key item should be accessed using the Dbt.get_recno_key_data method. The next() method returns false if no more data are available, and true otherwise.

`

Copyright Sleepycat Software