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
SQL::Translator::Filter::DefaultExtra(3) User Contributed Perl Documentation SQL::Translator::Filter::DefaultExtra(3)

SQL::Translator::Filter::DefaultExtra - Set default extra data values for schema objects.

  use SQL::Translator;

  my $sqlt = SQL::Translator->new(
      from => 'MySQL',
      to   => 'MySQL',
      filters => [
        DefaultExtra => {
            # XXX - These should really be ordered

            # Default widget for fields to basic text edit.
            'field.widget' => 'text',
            # idea:
            'field(data_type=BIT).widget' => 'yesno',

            # Default label (human formated name) for fields and tables
            'field.label'  => '=ucfirst($name)',
            'table.label'  => '=ucfirst($name)',
        },
      ],
  ) || die "SQLFairy error : ".SQL::Translator->error;
  my $sql = $sqlt->translate || die "SQLFairy error : ".$sqlt->error;

Maybe I'm trying to do too much in one go. Args set a match and then an update, if you want to set lots of things, use lots of filters!

perl(1), SQL::Translator
2020-09-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

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