NAME
CXC::DB::DDL::Constants - Constants
VERSION
version 0.16
SYNOPSIS
use CXC::DB::DDL::Constants @tags, @symbols;
DESCRIPTION
This module provides a number of constants useful to build DDL. It imports a few from SQL::Translator::Schema::Constants, as well as all of the SQL types provided by DBI's sql_types tag
EXPORTS
Symbols
Tags
These tags are available via either :tag or -tag. Their associated symbols are available for export directly, e.g.
use CXC::DB::DDL::Constants 'NOT_NULL';
schema_constants
This tag provides these constants imported from SQL::Translator::Schema::Constants:
NOT_NULL
PRIMARY_KEY
FOREIGN_KEY
UNIQUE
NORMAL
CHECK_C
schema_constraint_match_types
FULL => 'full'
PARTIAL => 'partial'
SIMPLE => 'simple'
schema_constraint_on_delete
NO_ACTION => 'NO ACTION
RESTRICT => 'RESTRICT'
SET_NULL => 'SET NULL'
SET_DEFAULT => 'SET DEFAULT'
CASCADE => 'CASCADE'
schema_constraint_on_update
NO_ACTION => 'NO ACTION'
RESTRICT => 'RESTRICT'
SET_NULL => 'SET NULL'
SET_DEFAULT => 'SET DEFAULT'
CASCADE => 'CASCADE'
create_constants
CREATE_IF_NOT_EXISTS
CREATE_ALWAYS
CREATE_ONCE
supported_dbds
The database drivers known to work with CXC::DB::DDL and which may specialized code for their specific quirks.
DBD_SYBASE
DBD_SQLITE
DBD_POSTGRESQL
sql_type_constants
This provides all of the SQL types provided by DBI's sql_types tag. There are far too many to list here; run this code to enumerate them:
perl -MCXC::DB::DDL::Constants \
-E 'say join qq{\n}, sort $CXC::DB::DDL::Constants::EXPORT_TAGS{sql_type_constants}->@*'
Enumerating Functions
These functions return the values of the constants with the associated lower cased tag. For example,
SCHEMA_CONSTRAINT_MATCH_TYPES() -> 'full', 'partial', 'simple'
SCHEMA_CONSTANTS
SCHEMA_CONSTRAINT_MATCH_TYPES
SCHEMA_CONSTRAINT_ON_DELETE
SCHEMA_CONSTRAINT_ON_UPDATE
CREATE_CONSTANTS
SUPPORTED_DBDS
SQL_TYPE_CONSTANTS
All of the SQL types provided by DBI's sql_types tag
These functions return the names of the constants with the associated lower cased tag. For example,
SCHEMA_CONSTRAINT_MATCH_TYPES_NAMES() -> 'FULL', 'PARTIAL', 'SIMPLE'
SCHEMA_CONSTANTS_NAMES
SCHEMA_CONSTRAINT_MATCH_TYPES_NAMES
SCHEMA_CONSTRAINT_ON_DELETE_NAMES
SCHEMA_CONSTRAINT_ON_UPDATE_NAMES
CREATE_CONSTANTS_NAMES
SUPPORTED_DBDS_NAMES
SQL_TYPE_CONSTANTS_NAMES
SUPPORT
Bugs
Please report any bugs or feature requests to bug-cxc-db-ddl@rt.cpan.org or through the web interface at: https://rt.cpan.org/Public/Dist/Display.html?Name=CXC-DB-DDL
Source
Source is available at
https://gitlab.com/djerius/cxc-db-ddl
and may be cloned from
https://gitlab.com/djerius/cxc-db-ddl.git
SEE ALSO
Please see those modules/websites for more information related to this module.
AUTHOR
Diab Jerius <djerius@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2022 by Smithsonian Astrophysical Observatory.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007