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::Table

VERSION

version 0.13

OBJECT ATTRIBUTES

name

  The table name

schema

The schema that the table is in. If not specified, The "name" attribute is scanned for the schema, under the assumption that the form is

  <schema>.<table name>

indexes

The list of table indexes

constraints

The list of table constraints

checks

The list of table check constraints

fields

The list of fields

METHODS

has_schema

true if the "schema" attribute was set.

to_sqlt

  $sqlt_table = $table->to_sqlt( $dbh, $schema );

Return a SQL::Translator::Schema::Table object for the table. Requires a DBI data base handle and an SQL::Translator::Schema object.

exists

   $bool = $table->exists;

Check if the table exists in the database

field_names

   \@field_names = $table->field_names;

return the names of all of the fields

clear

   $table->clear;

clear the rows from the table

drop

   $table->drop;

delete the table from the database

add_to_schema

   $table->add_to_schema( $dbh, $schema );

Add the table to the schema (a SQL::Translator::Schema object).

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