SQL::Translator::Filter::DefaultExtra(3pm)

SQL::Translator::Filter::DefaultExtra3pm

Set default extra data values for schema objects.

Usage

  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;

Overview

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!

Releases

9 releases since Debian 5.0 (Lenny); the text changed 8 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11
  8. 12
  9. 13

From libsql-translator-perl 1.66-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.