GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SQL::TRANSLATOR::PRODUCER::MYSQL (3)

.ds Aq ’

NAME

SQL::Translator::Producer::MySQL - MySQL-specific producer for SQL::Translator

CONTENTS

SYNOPSIS

Use via SQL::Translator:



  use SQL::Translator;

  my $t = SQL::Translator->new( parser => ..., producer => MySQL, ... );
  $t->translate;



DESCRIPTION

This module will produce text output of the schema suitable for MySQL. There are still some issues to be worked out with syntax differences between MySQL versions 3 and 4 (SET foreign_key_checks, character sets for fields, etc.).

ARGUMENTS

This producer takes a single optional producer_arg mysql_version, which provides the desired version for the target database. By default MySQL v3 is assumed, and statements pertaining to any features introduced in later versions (e.g. CREATE VIEW) are not produced.

Valid version specifiers for mysql_version are listed here

    Table Types

Normally the tables will be created without any explicit table type given and so will use the MySQL default.

Any tables involved in foreign key constraints automatically get a table type of InnoDB, unless this is overridden by setting the mysql_table_type extra attribute explicitly on the table.

    Extra attributes.

The producer recognises the following extra attributes on the Schema objects.
<B>field.listB> Set the list of allowed values for Enum fields.
<B>field.binaryB>, <B>field.unsignedB>, <B>field.zerofillB> Set the MySQL field options of the same name.
<B>field.renamed_fromB>, <B>table.renamed_fromB> Use when producing diffs to indicate that the current table/field has been renamed from the old name as given in the attribute value.
<B>table.mysql_table_typeB> Set the type of the table e.g. ’InnoDB’, ’MyISAM’. This will be automatically set for tables involved in foreign key constraints if it is not already set explicitly. See Table Types.

Please note that the ENGINE option is the preferred method of specifying the MySQL storage engine to use, but this method still works for backwards compatibility.

<B>table.mysql_charsetB>, <B>table.mysql_collateB> Set the tables default character set and collation order.
<B>field.mysql_charsetB>, <B>field.mysql_collateB> Set the fields character set and collation order.

SEE ALSO

SQL::Translator, http://www.mysql.com/.

AUTHORS

darren chamberlain <darren@cpan.org>, Ken Youens-Clark <kclark@cpan.org>.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SQL::TRANSLATOR::PRODUCER::MYSQL (3) 2014-10-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.