Name
Bif::DB - helper methods for a read-only bif database
Version
0.1.5_8 (yyyy-mm-dd)
Synopsis
use strict;
use warnings;
use Bif::DB;
my $db = Bif::DB->connect( $dsn );
my @ids = $db->get_nodes( ':a3be2ff' );
Description
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.
Methods
- get_changes( $token ) -> @HashRefs
- Looks up the change identified by
.$ID
or matching .:$UUID
and returns a list of hash references containing the following keys:
- id - the node ID
- change_id - the ID of the change
- kind - the type of the node
- uuid - the universally unique identifier of the node
- get_nodes( $token ) -> @HashRefs
- Looks up the node(s) identified by
$ID
or matching :$UUID
and returns a list of hash references containing the following keys:
- id - the node ID
- first_change_id - the change_id that created the node
- kind - the type of the node
- parent_id - the parent node ID (if any)
- path - the path of the node
- tkind - the topic kind (if any)
- link_id - the ID this node is linked to (if any)
- uuid - the node's universally unique identifier
- id - the node ID
- first_change_id - the change_id that created the node
- kind - the type of the node
- uuid - the universally unique identifier of the node
- org_id - the org ID of the project
- path - the path of the project
- parent_id - the parent ID of the project
- local - true if the project is locally synchronized
- The list is sorted by hub name then by project path.
- NOTE: The underlying DBIx::ThinSQL method returns an Array References to the list in scalar context.
- project_status_ids( $project_id, $kind, @status ) -> \@ids, \@invalid
- 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.
Author
Mark Lawrence <nomad@null.net>
Copyright And License
Copyright 2013-2017 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.