Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

kiokudb::util(3pm) [debian man page]

KiokuDB::Util(3pm)					User Contributed Perl Documentation					KiokuDB::Util(3pm)

NAME
KiokuDB::Util - Utility functions for working with KiokuDB SYNOPSIS
use KiokuDB::Util qw(set weak_set); my $set = set(@objects); # create a transient set my $weak = weak_set(@objects); # to avoid circular refs DESCRIPTION
This module provides various helper functions for working with KiokuDB. EXPORTS
dsn_to_backend $dsn, %args Tries to parse $dsn, load the backend and invoke "new" on it. Used by "connect" in KiokuDB and the various command line interfaces. set weak_set Instantiate a Set::Object or Set::Object::Weak from the arguments, and then creates a KiokuDB::Set::Transient with the result. import_yaml $kiokudb, @files_or_dirs Loads YAML files with MooseX::YAML (if given a directory it will be searched recursively for files with a ".yml" extension are) into the specified KiokuDB directory in a single transaction. The YAML files can contain multiple documents, with each document treated as an object. If the YAML file contains a single non blessed array or hash then that structure will be dereferenced as part of the arguments to "insert". Here is an example of an array of objects, and a custom tag alias to ease authoring of the YAML file: %YAML 1.1 %TAG ! !MyFoo:: --- - !User id: foo real_name: Foo Bar email: foo@myfoo.com password: '{cleartext}test123' You can use a hash to specify custom IDs: %YAML 1.1 --- the_id: !Some::Class attr: moose perl v5.12.4 2010-12-19 KiokuDB::Util(3pm)

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