MySQL::Diff::Table(3pm)

MySQL::Diff::Table3pm

Table definition class

Usage

  use MySQL::Diff::Table
  my $db = MySQL::Diff::Database->new(%options);
  my $def           = $db->def();
  my $name          = $db->name();
  my $field         = $db->field();
  my $fields        = $db->fields();                # %$fields
  my $primary_key   = $db->primary_key();
  my $indices       = $db->indices();               # %$indices
  my $options       = $db->options();
  my $isfield       = $db->isa_field($field);
  my $isprimary     = $db->isa_primary($field);
  my $isindex       = $db->isa_index($field);
  my $isunique      = $db->is_unique($field);
  my $isfulltext    = $db->is_fulltext($field);

Overview

Parses a table definition into component parts.

Methods

Constructor

new( %options )

Instantiate the objects, providing the command line options for database access and process requirements.

Public Methods

Fuller documentation will appear here in time :)

•

def

Returns the table definition as a string.

•

name

Returns the name of the current table.

•

field

Returns the current field definition of the given field.

•

fields

Returns an array reference to a list of fields.

•

primary_key

Returns a hash reference to fields used as primary key fields.

•

indices

Returns a hash reference to fields used as index fields.

•

options

Returns the additional options added to the table definition.

•

isa_field

Returns 1 if given field is used in the current table definition, otherwise returns 0.

•

isa_primary

Returns 1 if given field is defined as a primary key, otherwise returns 0.

•

isa_index

Returns 1 if given field is used as an index field, otherwise returns 0.

•

is_unique

Returns 1 if given field is used as unique index field, otherwise returns 0.

•

is_fulltext

Returns 1 if given field is used as fulltext index field, otherwise returns 0.

•

is_auto_inc

Returns 1 if given field is defined as an auto increment field, otherwise returns 0.

Releases

7 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7–8
  2. 9
  3. 10–13

Author

Adam Spiers <[email protected]>

From libmysql-diff-perl 0.60-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.