NAME

Tangram::Cursor - traverse a result set

SYNOPSIS

	use Tangram;
   
	$cursor = $storage->cursor( $query_obj, $filter );

	while (my $obj = $cursor->current())
	{
		# process $obj
		$cursor->next();
	}

DESCRIPTION

A Cursor makes it possible to iterate over a result set without loading all the objects in memory.

INSTANCE METHODS

current

Returns the current object, or undef() if the result set is exhausted.

next

Moves to the next object in the result set, if any. Returns the new current object, or undef() if the result set is exhausted.

residue

Returns the values of the Expr that were passed to the retrieve directive of the Storage::select() or Storage::cursor() statement.

MULTIPLE CURSORS

Each Cursor has its own connection to the database, thus making it possible to have multiple active cursors.

SEE ALSO

Tangram::Storage