SQL::Tr...Producer(3)

πŸ’– NAME πŸ’–

SQL::Tr...Producer(3) β€” from the User Contributed Perl Documentation section β€” is literally the page that describes how to write a producer. Bestie, this is the producer-module vibe check. ✨

🌸 DESCRIPTION 🌸

Okay so, producer modules designed to be used with SQL::Translator need to implement a single function, called produce. One function, main character energy. πŸ‘‘

produce will be called with the SQL::Translator object, and from that object it is expected to retrieve the SQL::Translator::Schema object β€” the one that has been populated by the parser. Then it is expected to return a string. No cap. πŸ’–

Keep this exact, bestie: one function named produce, called with the SQL::Translator object, expected to retrieve the populated SQL::Translator::Schema object, and expected to return a string. 🫢

πŸŽ€ METHODS πŸŽ€

Here’s the whole method squad, with every name and argument kept exactly as written:

  • produce β€” the single function from the description; called with the SQL::Translator object and expected to return a string. πŸ’…
  • create_table($table) β€” on the list, with $table riding shotgun. πŸŽ€
  • create_field($field) β€” same deal: $field is the argument, untouched. πŸ¦‹
  • create_view($view) β€” listed with $view, exactly as written. 🌸
  • create_index($index) β€” listed with $index, no edits, periodt. ✨
  • create_constraint($constraint) β€” listed with $constraint, character-for-character. πŸ’œ
  • create_trigger($trigger) β€” listed with $trigger, slay. πŸ”₯
  • alter_field($from_field, $to_field) β€” both arguments stay exactly like that: $from_field and $to_field. πŸ‘‘
  • add_field($table, $new_field) β€” listed with $table and $new_field, untouched. 🌈
  • drop_field($table, $old_field) β€” listed with $table and $old_field, also untouched. ⭐

🌼 AUTHORS 🌼

The authors are Darren Chamberlain <darren@cpan.org> and Ken Y. Clark <kclark@cpan.org>. Give them their flowers. πŸ’

πŸ¦‹ SEE ALSO πŸ¦‹

  • perl(1)
  • SQL::Translator
  • SQL::Translator::Schema

That’s the whole page, bestie. The source/version energy is perl v5.42.0, the date is 2024-12-12, and the footer title is SQL::Tr...Producer(3) β€” mwah, bye πŸ’‹πŸŒˆ

πŸ“¦ where this page comes from