1SQL::Translator::SchemaU:s:eRrolCeo:n:tErxitbruat(e3d)PSeQrLl::DTorcaunmselnattaotri:o:nSchema::Role::Extra(3)
2
3
4

NAME

6       SQL::Translator::Schema::Role::Extra - "extra" attribute for schema
7       classes
8

SYNOPSIS

10           package Foo;
11           use Moo;
12           with qw(SQL::Translator::Schema::Role::Extra);
13

DESCRIPTION

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

METHODS

19   extra
20       Get or set the objects "extra" attributes (e.g., "ZEROFILL" for MySQL
21       fields).  Call with no args to get all the extra data.  Call with a
22       single name arg to get the value of the named extra attribute, returned
23       as a scalar. Call with a hash or hashref to set extra attributes.
24       Returns a hash or a hashref.
25
26         $field->extra( qualifier => 'ZEROFILL' );
27
28         $qualifier = $field->extra('qualifier');
29
30         %extra = $field->extra;
31         $extra = $field->extra;
32
33   remove_extra
34       "extra" can only be used to get or set "extra" attributes but not to
35       remove some. Call with no args to remove all extra attributes that have
36       been set before. Call with a list of key names to remove certain extra
37       attributes only.
38
39         # remove all extra attributes
40         $field->remove_extra();
41
42         # remove timezone and locale attributes only
43         $field->remove_extra(qw/timezone locale/);
44
45
46
47perl v5.36.0                      2022-0S7Q-L2:2:Translator::Schema::Role::Extra(3)
Impressum