Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dbix::class::schema::loader::dbi::writing(3pm) [debian man page]

DBIx::Class::Schema::Loader::DBI::Writing(3pm)		User Contributed Perl Documentation	    DBIx::Class::Schema::Loader::DBI::Writing(3pm)

NAME
DBIx::Class::Schema::Loader::DBI::Writing - Loader subclass writing guide for DBI SYNOPSIS
package DBIx::Class::Schema::Loader::DBI::Foo; # THIS IS JUST A TEMPLATE TO GET YOU STARTED. use strict; use warnings; use base 'DBIx::Class::Schema::Loader::DBI'; use mro 'c3'; sub _table_uniq_info { my ($self, $table) = @_; # ... get UNIQUE info for $table somehow # and return a data structure that looks like this: return [ [ 'keyname' => [ 'colname' ] ], [ 'keyname2' => [ 'col1name', 'col2name' ] ], [ 'keyname3' => [ 'colname' ] ], ]; # Where the "keyname"'s are just unique identifiers, such as the # name of the unique constraint, or the names of the columns involved # concatenated if you wish. } sub _table_comment { my ( $self, $table ) = @_; return 'Comment'; } sub _column_comment { my ( $self, $table, $column_number ) = @_; return 'Col. comment'; } 1; DETAILS
The only required method for new subclasses is "_table_uniq_info", as there is not (yet) any standardized, DBD-agnostic way for obtaining this information from DBI. The base DBI Loader contains generic methods that *should* work for everything else in theory, although in practice some DBDs need to override one or more of the other methods. The other methods one might likely want to override are: "_table_pk_info", "_table_fk_info", "_tables_list" and "_extra_column_info". See the included DBD drivers for examples of these. To import comments from the database you need to implement "_table_comment", "_column_comment" AUTHOR
See "AUTHOR" in DBIx::Class::Schema::Loader and "CONTRIBUTORS" in DBIx::Class::Schema::Loader. LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-08 DBIx::Class::Schema::Loader::DBI::Writing(3pm)

Check Out this Related Man Page

DBIx::Class::Schema::Loader::DBI::InterBase(3pm)	User Contributed Perl Documentation	  DBIx::Class::Schema::Loader::DBI::InterBase(3pm)

NAME
DBIx::Class::Schema::Loader::DBI::InterBase - DBIx::Class::Schema::Loader::DBI Firebird Implementation. DESCRIPTION
See DBIx::Class::Schema::Loader and DBIx::Class::Schema::Loader::Base. COLUMN NAME CASE ISSUES
By default column names from unquoted DDL will be generated in lowercase, for consistency with other backends. Set the preserve_case option to true if you would like to have column names in the internal case, which is uppercase for DDL that uses unquoted identifiers. Do not use quoting (the quote_char option in connect_info when in the default "preserve_case => 0" mode. Be careful to also not use any SQL reserved words in your DDL. This will generate lowercase column names (as opposed to the actual uppercase names) in your Result classes that will only work with quoting off. Mixed-case table and column names will be ignored when this option is on and will not work with quoting turned off. SEE ALSO
DBIx::Class::Schema::Loader, DBIx::Class::Schema::Loader::Base, DBIx::Class::Schema::Loader::DBI AUTHOR
See "AUTHOR" in DBIx::Class::Schema::Loader and "CONTRIBUTORS" in DBIx::Class::Schema::Loader. LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2012-06-08 DBIx::Class::Schema::Loader::DBI::InterBase(3pm)
Man Page