DBSche...:SQLite(3pm)
β¨ NAME β¨
DBIx::DBSchema::DBD::SQLite β the SQLite-native driver for DBIx::DBSchema, bestie π
Like, this is from the User Contributed Perl Documentation section, under the manual page name DBSche...:SQLite(3pm). Yeah the name got mangled, we don't talk about it π
πΈ SYNOPSIS πΈ
use DBI; use DBIx::DBSchema;
$dbh = DBI->connect('dbi:SQLite:tns_service_name', 'user','pass');
$schema = new_native DBIx::DBSchema $dbh;
okay so that's literally all you need, no cap. Connect, then new_native it. Slay. π
π¦ DESCRIPTION π¦
This module implements a SQLite-native driver for DBIx::DBSchema. It's giving "glue code that Just Works" and honestly we're obsessed. β¨
π AUTHORS π
- Jesse Vincent
<jesse@bestpractical.com> - Nathan Anderson
<http://1id.com/=nathan.anderson>
Iconic behavior from both of them fr fr π«Ά
π API π
π columns CLASS DBI_DBH TABLE
Give it an actual live DBI database handle and it hands you back a listref of listrefs (peep perllol if that's new to you). Every inner listref has six elements, in this exact order:
- column name
- column type
- nullability
- column length
- column default
- a field reserved for driver-specific use β and for sqlite, that field is whether this col is a primary key π
Six elements, six little besties, all in a row. Periodt.
π primary_key CLASS DBI_DBH TABLE
Hand it an active DBI database handle and it returns the primary key for the table you specified. That's it, that's the whole vibe. π
π unique CLASS DBI_DBH TABLE
Give it an active DBI database handle, get back a hashref of unique indices. The keys of that hashref are the index names, and the values are arrayrefs pointing at a list of column names for each one. Peep "HASHES OF LISTS" in perlsc and DBIx::DBSchema::ColGroup for the full lore π
π index CLASS DBI_DBH TABLE
Same energy as unique, except this one's for the non-unique indices. Active DBI database handle goes in, a hashref comes out. Keys = index names, values = arrayrefs pointing at a list of column names for each. Again, see "HASHES OF LISTS" in perldsc and DBIx::DBSchema::ColGroup π
ngl,uniqueandindexare basically twins β one's just the unique one and one's the non-unique one. Don't mix them up, bestie π
and that's the whole page, you ate it up bestie π β¨
This one's from perl v5.36.0, dated 2022-09-10, and it lives under DBSche...:SQLite(3pm) in the User Contributed Perl Documentation. Stan a classic. ππ
π¦ where this page comes from
- ubuntu noble: libdbix-dbschema-perl 0.47-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libdbix-dbschema-perl 0.47-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdbix-dbschema-perl 0.47-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