RDF::Trine::Store::DBI - Persistent RDF storage based on DBI
This document describes RDF::Trine::Store::DBI version 0.122
use RDF::Trine::Store::DBI;
RDF::Trine::Store::DBI provides a persistent triple-store using the DBI module.
new ( $model_name, $dbh )
new ( $model_name, $dsn, $user, $pass )
Returns a new storage object using the supplied arguments to construct a DBI object for the underlying database.
temporary_store
get_statements ($subject, $predicate, $object [, $context] )
Returns a stream object of all statements matching the specified subject, predicate and objects. Any of the arguments may be undef to match any value.
get_pattern ( $bgp [, $context] )
Returns a stream object of all bindings matching the specified graph pattern.
get_contexts
Returns an RDF::Trine::Iterator over the RDF::Trine::Node objects comprising the set of contexts of the stored quads.
add_statement ( $statement [, $context] )
Adds the specified $statement to the underlying model.
$statement
remove_statement ( $statement [, $context])
Removes the specified $statement from the underlying model.
remove_statements ( $subject, $predicate, $object [, $context])
count_statements ($subject, $predicate, $object)
Returns a count of all the statements matching the specified subject, predicate and objects. Any of the arguments may be undef to match any value.
add_uri ( $uri, $named, $format )
Addsd the contents of the specified $uri to the model. If $named is true, the data is added to the model using $uri as the named context.
$uri
$named
add_string ( $data, $base_uri, $named, $format )
Addsd the contents of $data to the model. If $named is true, the data is added to the model using $base_uri as the named context.
$data
$base_uri
add_statement ( $statement )
remove_statement ( $statement )
variable_columns ( $var )
Given a variable name, returns the set of column aliases that store the values for the column (values for Literals, URIs, and Blank Nodes).
add_variable_values_joins
Modifies the query by adding LEFT JOINs to the tables in the database that contain the node values (for literals, resources, and blank nodes).
_mysql_hash ( $data )
Returns a hash value for the supplied $data string. This value is computed using the same algorithm that Redland's mysql storage backend uses.
_mysql_node_hash ( $node )
Returns a hash value (computed by _mysql_hash for the supplied $node. The hash value is based on the string value of the node and the node type.
_mysql_hash
$node
statements_table
Returns the name of the Statements table.
statements_prefix
Returns the prefix for the underlying Statements database table.
set_statements_prefix ( $prefix )
Sets the prefix for the underlying Statements database table.
model_name
Returns the name of the underlying model.
make_private_predicate_view ( $prefix, @preds )
dbh
Returns the underlying DBI database handle.
init
Creates the necessary tables in the underlying database.
Please report any bugs or feature requests to <gwilliams@cpan.org>.
<gwilliams@cpan.org>
Gregory Todd Williams <gwilliams@cpan.org>
Copyright (c) 2006-2010 Gregory Todd Williams. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install RDF::Trine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RDF::Trine
CPAN shell
perl -MCPAN -e shell install RDF::Trine
For more information on module installation, please visit the detailed CPAN module installation guide.