1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
NAME
Catmandu::DBI - Catmandu tools to communicate with DBI based interfaces
SYNOPSIS
# 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
MODULES
Catmandu::Importer::DBI
Catmandu::Store::DBI
AUTHORS
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.
SEE ALSO
Catmandu, Catmandu::Importer , Catmandu::Store::DBI
|