Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

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

NAME
DBIx::Class::Schema::Loader::DBObject - Base Class for Database Objects Such as Tables and Views in DBIx::Class::Schema::Loader METHODS
loader The loader object this object is associated with, this is a required parameter to "new". name Name of the object. The object stringifies to this value. new The constructor, takes "loader", "name", "schema", and "ignore_schema" as key-value parameters. clone Make a shallow copy of the object. schema The schema (or owner) of the object. Returns nothing if "ignore_schema" is true. ignore_schema Set to true to make "schema" and "sql_name" not use the defined "schema". Does not affect "dbic_name" (for qualify_objects testing on SQLite.) sql_name Returns the properly quoted full identifier with "schema" and "name". dbic_name Returns a value suitable for the "__PACKAGE__->table" call in DBIx::Class Result files. SEE ALSO
DBIx::Class::Schema::Loader::Table, DBIx::Class::Schema::Loader, DBIx::Class::Schema::Loader::Base 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-05-05 DBIx::Class::Schema::Loader::DBObject(3pm)

Check Out this Related 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)
Man Page