MySQL:...atabase(3pm)

πŸ“¦
version 0.60 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– MySQL::Diff::Database πŸ’–

okay so bestie, welcome to MySQL::Diff::Database β€” it's the Database Definition Class from the MySQL::Diff crew, and it's literally the girl who takes your database definition and parses it into its component parts. she's giving librarian energy but make it SQL. πŸŽ€

it lives in the 3pm manual (User Contributed Perl Documentation, iykyk) and honestly? iconic.


✨ SYNOPSIS ✨

here's the vibe, copy it exactly, don't @ me:

use MySQL::Diff::Database;

my $db = MySQL::Diff::Database->new(%options);
my $source    = $db->source_type();
my $summary   = $db->summary();
my $name      = $db->name();
my @tables    = $db->tables();
my $table_def = $db->table_by_name($table);

my @dbs = MySQL::Diff::Database::available_dbs();

🌸 DESCRIPTION 🌸

so basically: it parses a database definition into component parts. that's the whole job. that's the whole girl. no cap. πŸ’…


πŸ‘‘ METHODS πŸ‘‘

🧚 Constructor

  • new( %options ) β€” she instantiates the objects for you, and you hand her the command line options for database access and process requirements. feed her the options, she makes the objects, periodt.

🫢 Public Methods

  • source_type() β€” returns 'file' if the data source is a text file, and 'db' if you're connected directly to a database. vibe check on where your data is actually coming from ✨
  • summary() β€” provides a summary of the database. she'll give you the rundown πŸ’–
  • name() β€” returns the name of the database. just the name. main character energy πŸ‘‘
  • tables() β€” returns a list of tables for the current database. all of them. the whole roster 🌈
  • table_by_name( $name ) β€” returns the table definition (see MySQL::Diff::Table) for the given table. you ask for a table by name, she hands you the whole definition. obsessed πŸ¦‹

πŸ”₯ FUNCTIONS πŸ”₯

⭐ Public Functions

  • available_dbs() β€” returns a list of the available databases.
not me needing you to know this: it is used as a function call, not a method call. so no arrow, bestie. fr fr.

Copyright (c) 2000-2016 Adam Spiers. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


🌈 SEE ALSO 🌈

mysqldiff, MySQL::Diff, MySQL::Diff::Table, MySQL::Diff::Utils

go read those too, they're all in the same friend group 🫢


πŸ’Œ AUTHOR πŸ’Œ

Adam Spiers <mysqldiff@adamspiers.org>


and that's the page, bestie!! πŸŽ€βœ¨ this one shipped as perl v5.26.2 on 2018-07-20 in the MySQL:...atabase(3pm) manual β€” love that for her, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from