MySQL:...:Table(3pm)
β¨ NAME β¨
MySQL::Diff::Table β the Table Definition Class, aka the glow-up your MySQL table definitions deserve π
(this lil icon lives in the User Contributed Perl Documentation corner of the manual, iykyk π)
πΈ SYNOPSIS πΈ
use MySQL::Diff::Table
my $db = MySQL::Diff::Database->new(%options);
my $def = $db->def();
my $name = $db->name();
my $field = $db->field();
my $fields = $db->fields(); # %$fields
my $primary_key = $db->primary_key();
my $indices = $db->indices(); # %$indices
my $options = $db->options();
my $isfield = $db->isa_field($field);
my $isprimary = $db->isa_primary($field);
my $isindex = $db->isa_index($field);
my $isunique = $db->is_unique($field);
my $isfulltext = $db->is_fulltext($field);
like yes bestie, that's literally the whole vibe check right there π¦
π DESCRIPTION π
okay so. this module parses a table definition into component parts. that's it, that's the whole job. it takes your big messy table definition and breaks it down into little bite-sized pieces so you can actually look at them. it's giving organizational queen energy π
π₯ METHODS π₯
π§ Constructor
new( %options )β instantiate the objects, bestie. you hand it the command line options it needs for database access and for the process requirements, and it makes you a fresh object. slay. β¨
π Public Methods
so like, the fuller documentation will appear here in time :) (yes really, that's what it says, the author said it first not me π). but for now, here's the roster:
defβ returns the table definition as a string. the whole thing, one string, iconic πnameβ returns the name of the current table. name check bestie πͺͺfieldβ returns the current field definition of the given field.fieldsβ returns an array reference to a list of fields.primary_keyβ returns a hash reference to fields used as primary key fields. the main characters πindicesβ returns a hash reference to fields used as index fields.optionsβ returns the additional options added to the table definition.isa_fieldβ returns1if the given field is used in the current table definition, otherwise returns0.isa_primaryβ returns1if the given field is defined as a primary key, otherwise returns0.isa_indexβ returns1if the given field is used as an index field, otherwise returns0.is_uniqueβ returns1if the given field is used as a unique index field, otherwise returns0.is_fulltextβ returns1if the given field is used as a fulltext index field, otherwise returns0.is_auto_incβ returns1if the given field is defined as an auto increment field, otherwise returns0. the field that just keeps going up, no cap, literally π
ngl the 1-or-0 thing is the entire personality of the is* methods. true or false, yes or no, it ate and left no crumbs π
π 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.
(yes, "same terms as Perl itself" β that's the whole license vibe, go read Perl's if you need the deets π«Ά)
π SEE ALSO π
mysqldiffMySQL::DiffMySQL::Diff::DatabaseMySQL::Diff::Utils
go read those too, bestie, the whole squad is here π
π¦ AUTHOR π¦
Adam Spiers <mysqldiff@adamspiers.org>
and that's a wrap on MySQL:...:Table(3pm), from User Contributed Perl Documentation β this version was churned out by perl v5.26.2 back on 2018-07-20, so yeah it's a lil vintage but it still ate π
β¨ periodt
π¦ 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