FreeBSD Manual Pages
Teng::Schema::Dumper(3User Contributed Perl DocumentatiTeng::Schema::Dumper(3) NAME Teng::Schema::Dumper - Schema code generator SYNOPSIS use DBI; use Teng::Schema::Dumper; my $dbh = DBI->connect(@dsn) or die; print Teng::Schema::Dumper->dump( dbh => $dbh, namespace => 'Mock::DB', inflate => +{ user => q| use Mock::Inflate::Name; inflate 'name' => sub { my ($col_value) = @_; return Mock::Inflate::Name->new(name => $col_value); }; deflate 'name' => sub { my ($col_value) = @_; return ref $col_value ? $col_value->name : $col_value . '_deflate'; }; inflate qr/.+oo/ => sub { my ($col_value) = @_; return Mock::Inflate::Name->new(name => $col_value); }; deflate qr/.+oo/ => sub { my ($col_value) = @_; return ref $col_value ? $col_value->name : $col_value . '_deflate'; }; |, }, ); DESCRIPTION This module generates the Perl code to generate Teng::Schema instance. You can use it by "do "my/schema.pl"" or embed it to the package. METHODS "Teng::Schema::Dumper->dump(dbh => $dbh, namespace => $namespace)" This is the method to generate code from DB. It returns the Perl5 code in string. The arguments are: "dbh" Database handle from DBI. "namespace" your project Teng namespace. "base_row_class" Specify the default base row class for Teng::Schema::Declare. perl v5.32.0 2020-08-10 Teng::Schema::Dumper(3)
NAME | SYNOPSIS | DESCRIPTION | METHODS
Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Teng::Schema::Dumper&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>