pgc-db/README

29 lines
1.0 KiB
Plaintext
Raw Normal View History

2022-09-10 15:51:11 +00:00
This is to help me get acquainted with DBIx::Class, based on the
tutorial at
<https://metacpan.org/release/JROBINSON/DBIx-Class-Tutorial-0.0001/view/lib/DBIx/Class/Tutorial/Part1.pod#Getting-data>
plus a little testing using Test2::Suite.
Typical usage in development after making changes is
2022-09-10 15:51:11 +00:00
prove -l
which clears out the database tables early in the tests, leaving test
rows in place when it's finished.
A script creates the tables with SQL, I didn't attempt to use DBIx for
that as yet. The SQL and the make-schema script are for postgres
since that was expedient for me. It also assumes the simplest case
where you have a default database that postgres will connect you to if
you don't name one.
The tests run by prove leave a handful of rows in the tables. For a
larger number, suitable for demonstrating paging or searching, there
is a script in bin/. The load-gutenberg script loads from the catalog
file available at gutenberg.org, providing thousands of authors and
book titles. See the script comments for details.
2022-09-10 15:51:11 +00:00
barnold <barnold@tilde.club>