The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

CXC::DB::DDL::Constants - Constants

VERSION

version 0.13

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 for 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

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