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

SQL::Translator::Filter::Names3pm

Tweak the names of schema objects.

Usage

  #! /usr/bin/perl -w
  use SQL::Translator;
  # Lowercase all table names and upper case the first letter of all field
  # names. (MySql style!)
  #
  my $sqlt = SQL::Translator->new(
      filename => \@ARGV,
      from     => 'MySQL',
      to       => 'MySQL',
      filters => [
        Names => {
            'tables' => 'lc',
            'fields' => 'ucfirst',
        },
      ],
  ) || die "SQLFairy error : ".SQL::Translator->error;
  print($sqlt->translate) || die "SQLFairy error : ".$sqlt->error;

Overview

Tweak the names of schema objects by providing functions to filter the names from the given into the desired forms.

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.