Bif::DB - helper methods for a read-only bif database
0.1.0_28 (2014-09-23)
use strict; use warnings; use Bif::DB; # Bif::DB inherits from DBIx::ThinSQL, which inherits from DBI. my $db = Bif::DB->connect( $dsn ); # Read only operations on a bif database: my @ids = $db->uuid2id( $uuid );
Bif::DB is a DBI derivative that provides various read-only methods for retrieving information from a bif repository. For a read-write equivalent see Bif::DBW. The read-only and read-write parts are separated for performance reasons.
Returns the (possibly multiple) integer ID(s) matching a topic $UUID.
$UUID
Looks up the change identified by $ID.$UPDATE_ID and returns undef or a hash reference containg the following keys:
$ID.$UPDATE_ID
id - the topic ID
change_id - the ID of the change
kind - the type of the topic
uuid - the universally unique identifier of the topic
If the change relates to an issue then the following keys will also contain valid values:
project_issue_id - the project-specific topic ID
project_id - the project ID matching the project_issue_id
Returns the ID for the local repository topic.
Looks up the project(s) identified by $PATH (and optionally $HUB) returns undef, or a list of hash references containg the following keys:
$PATH
$HUB
first_change_id - the change_id that created the topic
path - the path of the project
parent_id - the parent ID of the project
hub_id - the id of the project's hub
hub_name - the name of the project's hub
local - true if the project is locally synchronized
The list is sorted by hub name then by project path.
Takes a project ID, a thread type (task, issue, etc) and a list of status names and returns an arrayref of matching IDs, and an arrayref of invalid names. This method will silently ignore any @status which are undefined.
Returns a list of HASH references containing information about the hub identified by $name, each with the following keys:
$name
id - the topic ID for the hub
name - the name of the hub
location - the location of the hub
is_default - true if it is the default location
Returns undef if $name (a name, an ID, or a location) is not found.
undef
Returns the maximum change ID in the database.
This is developer aide to print out foreign key relationship that are not satisfied (i.e. where the target row/column doesn't exist).
Bif::DBW
Mark Lawrence <nomad@null.net>
Copyright 2013-2014 Mark Lawrence <nomad@null.net>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
To install App::bif, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::bif
CPAN shell
perl -MCPAN -e shell install App::bif
For more information on module installation, please visit the detailed CPAN module installation guide.