changed POD formatting
This commit is contained in:
parent
bf5a0145ae
commit
2b6eb201a9
55 changed files with 1188 additions and 3220 deletions
|
|
@ -97,33 +97,25 @@ sub buildWhereElement {
|
|||
|
||||
=head2 new( %p )
|
||||
|
||||
=over
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
A hashref of field name to a hash reference of property settings.
|
||||
|
||||
Currently used settings are:
|
||||
|
||||
=over
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
If true values for this field are automatically quoted.
|
||||
|
||||
=back
|
||||
|
||||
=item table
|
||||
=head3 table
|
||||
|
||||
The name of the table to query.
|
||||
|
||||
=item where
|
||||
=head3 where
|
||||
|
||||
A hash reference or array reference of arguments to build a where clause from.
|
||||
See parseWhereArgs for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
@ -172,13 +164,11 @@ sub _parsePart {
|
|||
Recursivley parses a list of where arguments joining them with "AND" or "OR". Arguments
|
||||
may take a number of forms:
|
||||
|
||||
=over
|
||||
|
||||
=item * scalar
|
||||
=head3 * scalar
|
||||
|
||||
("A = 1") is left unchanged.
|
||||
|
||||
=item * array reference
|
||||
=head3 * array reference
|
||||
|
||||
An array reference causes the joining argument to switch from 'AND' to 'OR'
|
||||
(or visa-versa) for its contents:
|
||||
|
|
@ -189,7 +179,7 @@ becomes:
|
|||
|
||||
"(A = 1 OR C = 2)"
|
||||
|
||||
=item * hash reference
|
||||
=head3 * hash reference
|
||||
|
||||
These are a convienent way of being able to dynamically build up complex
|
||||
queries gradually.
|
||||
|
|
@ -200,8 +190,6 @@ becomes:
|
|||
|
||||
"A = 1 AND C = 2"
|
||||
|
||||
=back
|
||||
|
||||
This routine is flexiable enough to be able to parse arguments of the form:
|
||||
|
||||
({A => [1,2]},[{B => 3,C => 4}],{D => 5})
|
||||
|
|
|
|||
|
|
@ -63,33 +63,25 @@ sub buildQuery {
|
|||
|
||||
=head2 new( %p )
|
||||
|
||||
=over
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
A hashref of field name to a hash reference of property settings.
|
||||
|
||||
Currently used settings are:
|
||||
|
||||
=over
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
If true values for this field are automatically quoted.
|
||||
|
||||
=back
|
||||
|
||||
=item table
|
||||
=head3 table
|
||||
|
||||
The name of the table to query.
|
||||
|
||||
=item where
|
||||
=head3 where
|
||||
|
||||
A hash reference or array reference of arguments to build a where clause from.
|
||||
See parseWhereArgs for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -81,28 +81,20 @@ sub buildQuery {
|
|||
|
||||
=head2 new( %p )
|
||||
|
||||
=over
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
A hash reference of field name to value.
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
=over
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
If true values for this field are automatically quoted.
|
||||
|
||||
=back
|
||||
|
||||
=item table
|
||||
=head3 table
|
||||
|
||||
The name of the table to query.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
|
|||
|
|
@ -119,39 +119,33 @@ sub buildSelectFields {
|
|||
|
||||
=head2 new( %p )
|
||||
|
||||
=over
|
||||
|
||||
=item fields
|
||||
=head3 fields
|
||||
|
||||
An array reference of field names (optional).
|
||||
|
||||
=item groupBy
|
||||
=head3 groupBy
|
||||
|
||||
An array reference of fields to group results by
|
||||
|
||||
=item limit
|
||||
=head3 limit
|
||||
|
||||
A scalar limit.
|
||||
|
||||
=item orderBy
|
||||
=head3 orderBy
|
||||
|
||||
An array reference of fields to order results by
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
=over
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
If true values for this field are automatically quoted.
|
||||
|
||||
=back
|
||||
|
||||
=item table
|
||||
=head3 table
|
||||
|
||||
The name of the table to query.
|
||||
|
||||
=item where
|
||||
=head3 where
|
||||
|
||||
A hash reference or array reference of arguments to build a where clause from.
|
||||
See WebGUI::Persistent::Query::parseWhereArgs for details.
|
||||
|
|
|
|||
|
|
@ -81,31 +81,23 @@ sub buildSet {
|
|||
|
||||
=head2 new( %p )
|
||||
|
||||
=over
|
||||
|
||||
=item data
|
||||
=head3 data
|
||||
|
||||
A hash reference of field name to value.
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
=over
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
If true values for this field are automatically quoted.
|
||||
|
||||
=back
|
||||
=head3 table
|
||||
|
||||
=item table
|
||||
|
||||
=item where
|
||||
=head3 where
|
||||
|
||||
A hash reference or array reference of arguments to build a where clause from.
|
||||
See WebGUI::Persistent::Query::parseWhereArgs for details.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub new {
|
||||
|
|
|
|||
|
|
@ -148,38 +148,30 @@ sub canUp { $_[0]->left_sister }
|
|||
This class method must be overridden to return a hash reference with one or
|
||||
more of the following keys.
|
||||
|
||||
=over
|
||||
|
||||
=item useDummyRoot
|
||||
=head3 useDummyRoot
|
||||
|
||||
This should be set to true for classes that don't store their root node in
|
||||
the database.
|
||||
|
||||
=item properties
|
||||
=head3 properties
|
||||
|
||||
This should be a hash reference keyed by the field names of the table that
|
||||
this class refers to (and should be able to be manipulated with this classes
|
||||
get() and set() methods). The values of the hash reference should be hash
|
||||
references containing settings for each field.
|
||||
|
||||
=over
|
||||
|
||||
=item * defaultValue
|
||||
=head3 * defaultValue
|
||||
|
||||
The default value for this field (optional).
|
||||
|
||||
=item * key
|
||||
=head3 * key
|
||||
|
||||
Should be true for the primary key column (one field must be set in this way).
|
||||
|
||||
=item * quote
|
||||
=head3 * quote
|
||||
|
||||
Should be true for fields that need to be quoted in database queries.
|
||||
|
||||
=back
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue