NAME
Myco::Query::Part - a Myco entity class
SYNOPSIS
use Myco;
# Constructors. See Myco::Entity for more.
my $obj = Myco::Query::Part->new;
# Accessors:
# see attribute list below
$obj->save;
$obj->destroy;
DESCRIPTION
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.
COMMON ENTITY INTERFACE
Constructor, accessors, and other methods -- as inherited from Myco::Entity.
ATTRIBUTES
Attributes may be initially set during object construction (with new()
) but otherwise are accessed solely through accessor methods. Typical usage:
Set attribute value
$obj->set_attribute($value);
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.Get attribute value
$value = $obj->get_attribute;
A listing of available attributes follows:
part_join_oper
type: string values: &, ||, 'and', 'or'
The perl (tangram) operator used to join one Myco::Query::Part object to the next.
optional
type: int values: 1, 0 (yes/no)
Boolean value indicating whether the given query clause (and its attendant parameters) is optional.
LICENSE AND COPYRIGHT
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.
SEE ALSO
Myco::Query::Part::Test, Myco::Entity, Myco, Tangram, Class::Tangram, myco-mkentity