DBIx::Class::KiokuDB(3pm)

DBIx::Class::KiokuDB3pm

Refer to kiokudb objects from dbix::class tables.

Usage

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');

Version

version 1.23

Overview

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.

Releases

6 releases since Debian 7 (Wheezy); the text changed 3 times.

  1. 7
  2. 8–9
  3. 10
  4. 12–13

Author

Yuval Kogman <[email protected]>

From libkiokudb-backend-dbi-perl 1.23-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.