Myco::Query::Part - a Myco entity class
use Myco; # Constructors. See Myco::Entity for more. my $obj = Myco::Query::Part->new; # Accessors: # see attribute list below $obj->save; $obj->destroy;
This class abstracts the idea of a part of a Myco::QueryTemplate object. A part can be a filter (see Myco::Query::Part::Filter) or clause (Myco::Query::Part::Clause). A filter can itself contain clauses, thereby introducing the possibility (indeed, the routine requirement) of recursiveness in the construction of a query object.
Constructor, accessors, and other methods -- as inherited from Myco::Entity.
Attributes may be initially set during object construction (with
new()) but otherwise are accessed solely through accessor methods. Typical usage:
Check functions (see Class::Tangram) perform data validation. If there is any concern that the set method might be called with invalid data then the call should be wrapped in an
eval block to catch exceptions that would result.
$value = $obj->get_attribute;
A listing of available attributes follows:
type: string values: &, ||, 'and', 'or'
The perl (tangram) operator used to join one Myco::Query::Part object to the next.
type: int values: 1, 0 (yes/no)
Boolean value indicating whether the given query clause (and its attendant parameters) is optional.
Copyright (c) 2006 the myco project. All rights reserved. This software is free software; you can redistribute it and/or modify it under the same terms as Perl itself.