MySQL:...atabase(3pm)
π 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 (seeMySQL::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 AND LICENSE π
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
- debian bookworm: libmysql-diff-perl 0.60-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmysql-diff-perl 0.60-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libmysql-diff-perl 0.60-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmysql-diff-perl 0.60-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms