Catmandu::DBI(3pm)
π Catmandu::DBI β the vibe β¨
okay so bestie, welcome to Catmandu::DBI (that's the Catmandu::DBI(3pm) page, part of the User Contributed Perl Documentation, iykyk). It's literally the Catmandu toolkit for talking to DBI-based interfaces. Databases? We're chatting with them. Periodt. π«Ά
πΈ NAME πΈ
Catmandu::DBI β Catmandu tools to communicate with DBI based interfaces π
β¨ SYNOPSIS β¨
the whole point, right here, no cap:
# From the command line
# Export data from a relational database
$ catmandu convert DBI --dsn dbi:mysql:foobar --user foo --password bar --query "select * from table"
# Import data into a relational database
$ catmandu import JSON to DBI --data_source dbi:SQLite:mydb.sqlite < data.json
# Export data from a relational database
$ catmandu export DBI --data_source dbi:SQLite:mydb.sqlite to JSON
# Or via a configuration file
$ cat catmandu.yml
---
store:
mydb:
package: DBI
options:
data_source: "dbi:mysql:database=mydb"
username: xyz
password: xyz
...
$ catmandu import JSON to mydb < data.json
$ catmandu export mydb to YAML > data.yml
# Export one record
$ catmandu export mydb --id 012E929E-FF44-11E6-B956-AE2804ED5190 to JSON > record.json
# Count the number of records
$ catmandu count mydb
# Delete data
$ catmandy delete mydb
π¨ okay so heads up, that last one sayscatmandyβ yes,catmandy, with a y. That's exactly how it is in the original, bestie, so I'm keeping it character-for-character. Whether it's a typo or a secret fifth command is between you and your shell. π
π MODULES π
the actual star players:
- Catmandu::Importer::DBI
- Catmandu::Store::DBI
π AUTHORS π
the icons who built this:
- Nicolas Franck
<nicolas.franck at ugent.be> - Patrick Hochstenbach
<patrick.hochstenbach at ugent.be> - Vitali Peil
<vitali.peil at uni-bielefeld.de> - Nicolas Steenlant
<nicolas.steenlant at ugent.be>
π COPYRIGHT π
Copyright 2024 - Nicolas Franck, Patrick Hochstenbach, Vitali Peil, Nicolas Steenlant
π LICENSE π
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
(translation: free as in go off, just keep the same terms as Perl. slay. β¨)
π¦ SEE ALSO π¦
go read these next, fr fr:
- Catmandu
- Catmandu::Importer
- Catmandu::Store::DBI
and that's the whole page, bestie!! π this doc is perl v5.38.2, dated 2024-03-24 β so like, freshly iconic. go query something. you got this. π
β¨π«Ά
π¦ where this page comes from
- debian trixie: libcatmandu-dbi-perl 0.13-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-dbi-perl 0.13-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-dbi-perl 0.13-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