Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Oryx::Attribute(3)    User Contributed Perl Documentation   Oryx::Attribute(3)

NAME
       Oryx::Attribute - Attribute meta-type for Oryx persistent classes

SYNOPSIS
	my $attrib = Oryx::Attribute->new( \%meta, $owner );
	$attrib->name;		       # name used for accessor	generation
	$attrib->size;		       # size constraint for the value
	$attrib->type;		       # value type
	$attrib->required;	       # NOT NULL

DESCRIPTION
METHODS
       new( $meta, $owner )
       create
	   Abstract (see implementing subclasses)

       retrieve
	   Abstract (see implementing subclasses)

       update
	   Abstract (see implementing subclasses)

       delete
	   Abstract (see implementing subclasses)

       search
	   Abstract (see implementing subclasses)

       construct( $self, $obj )
	   Inflate the attribute value and "tie" it to the implementing	Value
	   class, eg: Oryx::Value::String, Oryx::Value::Complex	etc. (see
	   perltie)

       name
	   returns the "name" meta-attribute for this attribute. This is the
	   same	as the accessor	and the	field in the table in which the	value
	   for this attribute is stored.

       type
	   returns the "type" meta-attribute for this attribute. Defaults to
	   'String'.

       size
	   returns the "size" meta-attribute for this attribute. This is the
	   allowed length for the 'String' or size of 'Number' etc. and	is
	   used	for input checking by the Value	type. No default.

       required
	   returns the value of	the "required" meta-attribute. This has	the
	   effect of raising an	error if an instance of	the owning class is
	   constructed without a value for this	field defined in the prototype
	   hash	reference which	is passed to "Oryx::Class->create( \%proto )".
	   Equivalent to a NOT NULL constraint.

       primitive
	   returns a list the first argument of	which is one of: 'Integer',
	   'String', 'Boolean',	'Float', 'Text', 'Binary' or 'DateTime'	which
	   are mapped to SQL column types by the Oryx::DBI::Util classes. The
	   second argument is an optional size constraint.

       type_class
	   returns the canonical package name of the implementing Oryx::Value
	   meta-type for this attribute.

AUTHOR
       Richard Hundt <richard NO SPAM AT protea-systems.com>

THANKS TO
       Andrew Sterling Hanenkamp

LICENCE
       This module is free software and	may be used under the same terms as
       Perl itself.

perl v5.32.0			  2005-12-30		    Oryx::Attribute(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS | AUTHOR | THANKS TO | LICENCE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Oryx::Attribute&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help