SQL::Tr...ultExtra(3)

πŸŽ€ NAME πŸŽ€

okay so bestie, welcome to this User Contributed Perl Documentation page for SQL::Translator::Filter::DefaultExtra β€” the manual name is SQL::Tr...ultExtra(3), iykyk πŸ’…. It does the iconic thing of setting default extra data values for schema objects. That's the whole vibe. 🫢

✨ SYNOPSIS ✨

this is literally how you call it, no cap β€” code copied exactly, so don't come for me about the comments 😭:

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;

🌸 DESCRIPTION 🌸

the author is literally saying: "Maybe I'm trying to do too much in one go." 😭 and honestly? mood. Here's the whole tea: Args set a match and then an update. If you want to set lots of things, use lots of filters! That's it β€” no hidden lore, no extra behavior, just that. ✨

πŸ¦‹ SEE ALSO πŸ¦‹

go look at these besties when you're done:


πŸ’– cute sign-off: this page is from perl v5.42.0, dated 2024-12-12, and it's the SQL::Tr...ultExtra(3) manual page. bye bestie, slay responsibly! πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from