Catmandu::DBI(3pm)

πŸ“¦
version 0.13 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 says catmandy β€” 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 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