Yancy::Backend::Role::Relational - A role to give a relational backend relational capabilities
version 1.040
package Yancy::Backend::RDBMS; with 'Yancy::Backend::Role::Relational';
This role implements utility methods to make backend classes work with entity relations, using DBI methods such as DBI/foreign_key_info.
DBI/foreign_key_info
The composing class must implement the following:
The value must be a relative of Mojo::Pg et al.
String naming the Mojo::* class.
Mojo::*
String with the value at the start of a DBI dsn.
dsn
Called with a table name, returns a boolean of true to keep, false to discard - typically for a system table.
Called with a column's default value, returns the corrected version, which if undef means no default.
undef
Called with a table-name, and the array-ref returned by "column_info" in DBI, returns a hash-ref mapping column names to an "extra info" hash for that column, with possible keys:
a boolean
an array-ref of allowed values
Returns the DBI "catalog" argument for e.g. "column_info" in DBI.
Returns the DBI "schema" argument for e.g. "column_info" in DBI.
Self-explanatory, implements "new" in Yancy::Backend.
Given a schema, returns the string name of its ID field.
Given a schema, parameters and options, returns SQL to generate the actual results, the count results, and the bind-parameters.
Given a schema and data, normalises any boolean values to 1 and 0.
Self-explanatory, implements "delete" in Yancy::Backend.
Self-explanatory, implements "set" in Yancy::Backend.
Self-explanatory, implements "get" in Yancy::Backend.
Self-explanatory, implements "list" in Yancy::Backend.
Self-explanatory, implements "read_schema" in Yancy::Backend.
Yancy::Backend
Doug Bell <preaction@cpan.org>
This software is copyright (c) 2019 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Yancy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Yancy
CPAN shell
perl -MCPAN -e shell install Yancy
For more information on module installation, please visit the detailed CPAN module installation guide.