Commit | Line | Data |
27901cd5 |
1 | package SQL::Translator::Constants; |
2 | use DBI qw(:sql_types); |
d7cecc50 |
3 | use Sub::Exporter -setup => { |
d8d79091 |
4 | exports => [ @{$DBI::EXPORT_TAGS{sql_types}}, CHECK_C, FOREIGN_KEY, FULL_TEXT, SPATIAL, NOT_NULL, NORMAL, NULL, PRIMARY_KEY, UNIQUE ], |
d7cecc50 |
5 | groups => { |
03749994 |
6 | sqlt_types => [ @{$DBI::EXPORT_TAGS{sql_types}} ], |
7 | sqlt_fk_actions => [ qw(SQLT_FK_CASCADE SQLT_FK_RESTRICT SQLT_FK_SET_NULL SQLT_FK_NO_ACTION SQLT_FK_SET_DEFAULT) ], |
d8d79091 |
8 | sqlt_constants => [ qw(CHECK_C FOREIGN_KEY FULL_TEXT SPATIAL NOT_NULL NORMAL NULL PRIMARY_KEY UNIQUE) ], |
d7cecc50 |
9 | } |
10 | }; |
27901cd5 |
11 | |
03749994 |
12 | use constant SQLT_FK_CASCADE => 0; |
13 | use constant SQLT_FK_RESTRICT => 1; |
14 | use constant SQLT_FK_SET_NULL => 2; |
15 | use constant SQLT_FK_NO_ACTION => 3; |
16 | use constant SQLT_FK_SET_DEFAULT => 4; |
17 | |
d8d79091 |
18 | use constant CHECK_C => 'CHECK'; |
19 | use constant FOREIGN_KEY => 'FOREIGN KEY'; |
20 | use constant FULL_TEXT => 'FULLTEXT'; |
21 | use constant SPATIAL => 'SPATIAL'; |
22 | use constant NOT_NULL => 'NOT NULL'; |
23 | use constant NORMAL => 'NORMAL'; |
24 | use constant NULL => 'NULL'; |
25 | use constant PRIMARY_KEY => 'PRIMARY KEY'; |
26 | use constant UNIQUE => 'UNIQUE'; |
27 | |
27901cd5 |
28 | 1; |