NNexus::DB::API - API routines for commonly used NNexus queries
NNexus::DB::API
use NNexus::DB; my $db = NNexus::DB->new(%options); $db->method(@arguments);
This class provides API methods for specific SQL queries commonly needed by NNexus.
$db->add_object_by(url=>$url,domain=>$domain);
Adds a new object, identified by its $url and $domain. The $domain should match the name of the NNexus::Index::$domain plug-in class.
$db->select_object_by(url=>$url,objectid=>$objectid);
Retrieve the DB row of an object, identified by its $url, OR $objectid. Returns a Perl hashref, each key being a DB column name.
$db->add_concept_by(%options);
$db->select_concept_by(%options);
$db->delete_concept_by(%options);
$db->select_firstword_matches($word);
$db->add_linkscache_by(%options);
$db->select_linkscache_by(%options);
$db->delete_linkscache_by(%options);
$db->invalidate_by(%options);
$db->last_inserted_id;
Return the last inserted id, in an auto-generated primary key column. DBMS-independent, supports MySQL and SQLite so far.
$db->reset_db;
Reset, and if necessary initialize, a SQLite database. This routine holds the reference code, defining the NNexus database schema. NOTE: Only works for a SQLite backend.
Deyan Ginev <d.ginev@jacobs-university.de>
Research software, produced as part of work done by the KWARC group at Jacobs University Bremen. Released under the MIT license (MIT)
To install NNexus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm NNexus
CPAN shell
perl -MCPAN -e shell install NNexus
For more information on module installation, please visit the detailed CPAN module installation guide.