Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dbix::class::kiokudb(3pm) [debian man page]

DBIx::Class::KiokuDB(3pm)				User Contributed Perl Documentation				 DBIx::Class::KiokuDB(3pm)

NAME
DBIx::Class::KiokuDB - Refer to KiokuDB objects from DBIx::Class tables. SYNOPSIS
See DBIx::Class::Schema::KiokuDB. package MyApp::DB::Result::Album; use base qw(DBIx::Class); __PACKAGE__>load_components(qw(Core KiokuDB)); __PACKAGE__->table('album'); __PACKAGE__->add_columns( id => { data_type => "integer" }, title => { data_type => "varchar" }, # the foreign key for the KiokuDB object: metadata => { data_type => "varchar" }, ); __PACKAGE__->set_primary_key('id'); # enable a KiokuDB rel on the column: __PACKAGE__->kiokudb_column('metadata'); DESCRIPTION
This DBIx::Class component provides the code necessary for DBIx::Class::Row objects to refer to KiokuDB objects stored in KiokuDB::Backend::DBI. CLASS METHODS
kiokudb_column $rel Declares a relationship to any KiokuDB object. In future versions adding relationships to different sub-collections will be possible as well. METHODS
store A convenience method that calls "store" in KiokuDB on all referenced KiokuDB objects, and then invokes "insert_or_update" on $self. get_kiokudb_column $col set_kiokudb_column $col, $obj store_kiokudb_column $col, $obj See DBIx::Class::Row. OVERRIDDEN METHODS
new Recognizes objects passed in as column values, much like standard relationships do. insert Also calls "insert" in KiokuDB on all referenced objects that are not in the KiokuDB storage. update Adds a check to ensure that all referenced KiokuDB objects are in storage. perl v5.12.4 2011-10-04 DBIx::Class::KiokuDB(3pm)

Check Out this Related Man Page

KiokuDB::TypeMap::Entry::Callback(3pm)			User Contributed Perl Documentation		    KiokuDB::TypeMap::Entry::Callback(3pm)

NAME
KiokuDB::TypeMap::Entry::Callback - Callback based inflation/deflation of objects SYNOPSIS
KiokuDB::TypeMap->new( entries => { 'My::Class' => KiokuDB::TypeMap::Entry::Callback->new( expand => "new", # My::Class->new(%$self) collapse => sub { my $self = shift; return %$self; # provide args to 'new' in this example }, id => sub { "foo" }, # 'id' callback is optional ), }, ); DESCRIPTION
This KiokuDB::TypeMap entry provides callback based inflation/deflation. The major limitation of this method is that it cannot be used for self referential structures. This is because the object being inflated is only constructed after all of its arguments are. For the overwhelming majority of the use cases this is good enough though. ATTRIBUTES
collapse A method name or code reference invoked on the object during collapsing. This is evaluated in list context, and the list of values it returns will be collapsed by the KiokuDB::Collapser and then stored. expand A method name or code reference invoked on the class of the object during loading. The arguments are as returned by the "collapse" callback. id An optional method name or code reference invoked to get an ID for the object. If one is not provided the default (UUID based) generation is used. intrinsic A boolean denoting whether or not the object should be collapsed with no ID, and serialized as part of its parent object. This is useful for value like objects, for whom the reference address makes no difference (such as URI objects). perl v5.12.4 2010-10-11 KiokuDB::TypeMap::Entry::Callback(3pm)
Man Page