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

FreeBSD Manual Pages

  
 
  

home | help
SQL::Translator::SchemUseroContributed)SQL::Translator::Schema::Role::Extra(3)

NAME
       SQL::Translator::Schema::Role::Extra - "extra" attribute	for schema
       classes

SYNOPSIS
	   package Foo;
	   use Moo;
	   with	qw(SQL::Translator::Schema::Role::Extra);

DESCRIPTION
       This role provides methods to set and get a hashref of extra attributes
       for schema objects.

METHODS
   extra
       Get or set the objects "extra" attributes (e.g.,	"ZEROFILL" for MySQL
       fields).	 Call with no args to get all the extra	data.  Call with a
       single name arg to get the value	of the named extra attribute, returned
       as a scalar. Call with a	hash or	hashref	to set extra attributes.
       Returns a hash or a hashref.

	 $field->extra(	qualifier => 'ZEROFILL'	);

	 $qualifier = $field->extra('qualifier');

	 %extra	= $field->extra;
	 $extra	= $field->extra;

   remove_extra
       "extra" can only	be used	to get or set "extra" attributes but not to
       remove some. Call with no args to remove	all extra attributes that have
       been set	before.	Call with a list of key	names to remove	certain	extra
       attributes only.

	 # remove all extra attributes
	 $field->remove_extra();

	 # remove timezone and locale attributes only
	 $field->remove_extra(qw/timezone locale/);

perl v5.32.0			  2020-SQL::Translator::Schema::Role::Extra(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS

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

home | help