1DBIx::SearchBuilder::UnUisoenr(3C)ontributed Perl DocumeDnBtIaxt:i:oSnearchBuilder::Union(3)
2
3
4

NAME

6       DBIx::SearchBuilder::Union - Deal with multiple SearchBuilder result
7       sets as one
8

SYNOPSIS

10         use DBIx::SearchBuilder::Union;
11         my $U = new DBIx::SearchBuilder::Union;
12         $U->add( $tickets1 );
13         $U->add( $tickets2 );
14
15         $U->GotoFirstItem;
16         while (my $z = $U->Next) {
17           printf "%5d %30.30s\n", $z->Id, $z->Subject;
18         }
19

WARNING

21       This module is still experimental.
22

DESCRIPTION

24       Implements a subset of the DBIx::SearchBuilder collection methods, but
25       enough to do iteration over a bunch of results.  Useful for displaying
26       the results of two unrelated searches (for the same kind of objects) in
27       a single list.
28

METHODS

30   new
31       Create a new DBIx::SearchBuilder::Union object.  No arguments.
32
33   add $sb
34       Add a searchbuilder result (collection) to the Union object.
35
36       It must be the same type as the first object added.
37
38   First
39       Return the very first element of the Union (which is the first element
40       of the first Collection).  Also reset the current pointer to that
41       element.
42
43   Next
44       Return the next element in the Union.
45
46   Last
47       Returns the last item
48
49   Count
50       Returns the total number of elements in the Union'ed Collection
51
52   GotoFirstItem
53       Starts the recordset counter over from the first item. the next time
54       you call Next, you'll get the first item returned by the database, as
55       if you'd just started iterating through the result set.
56
57   IsLast
58       Returns true if the current row is the last record in the set.
59
60   ItemsArrayRef
61       Return a refernece to an array containing all objects found by this
62       search.
63
64       Will destroy any positional state.
65

AUTHOR

67       Copyright (c) 2004 Robert Spier
68
69       All rights reserved.
70
71       This library is free software; you can redistribute it and/or modify it
72       under the same terms as Perl itself.
73

SEE ALSO

75       DBIx::SearchBuilder
76
77
78
79perl v5.12.4                      2011-07-28     DBIx::SearchBuilder::Union(3)
Impressum