RedlandDave Beckett |
|||||
|
Redland BindingsLanguagesDemonstrationsDownloadsData |
Redland RDF Language Bindings - Perl RDF::Redland::Storage ClassNAMERDF::Redland::Storage - Redland RDF Storage Class SYNOPSIS
use RDF::Redland;
my $storage=new RDF::Redland::Storage("hashes", "test", "new='yes',hash-type='memory'");
...
DESCRIPTIONCreate objects for storing RDF::Redland::Model objects either persistently or in memory. CONSTRUCTORS
Work in DIR directory when creating files. File creation mode, default is (octal) 0644 Takes decimal (123), hex (0x123) or octal (0123). Enable statement contexts. Each statement can be stored with an optional context Node and the context retrieved after queries. Boolean. Use the TYPE hash-type for hashes storage. Current defined types are 'memory' and 'bdb' but is dependent on the hash factories available. Enable indexing from predicates to (subject,object) which can in particular be useful for rdf:type relations. Boolean. Whether model/storage method add_statements should be optimized, until a model/storage sync operation. Boolean. Whether to maintain a table with merged models. Boolean. Example, string form:
$storage=new RDF::Redland::Storage("hashes", "test",
"new='yes',hash-type='bdb',dir='.'");
Example, Perl hash form:
$storage=new RDF::Redland::Storage("hashes", "test",
{new=>1,hash-type=>'bdb',dir=>'.'});
Creates a new storage of the hashes type (indexed hashes) named test (these will be file names or URIs if the storage is persistent) and with options new='yes',hash-type='bdb',dir='.' so a new storage is created with BerkeleyDB (BDB) key:value hashes i.e. persistent and in the current directory. Example, Perl hash form:
$storage=new RDF::Redland::Storage("mysql", "test", {host=>'localhost',database=>'testdb',user=>'testuser',new=>0,password=>'',contexts=>1});
Uses an existing storage of the mysql type, named test on localhost with database name testdb using a user testuser and no password. Contexts are enabled. Create a new RDF::Redland::Storage object from RDF::Redland::Storage STORAGE (copy constructor). The new storage may have a new name chosen by the storage factory. SEE ALSOthe RDF::Redland::Model manpage AUTHORDave Beckett - http://www.dajobe.org/ (C) Copyright (C) 2000-2007 Dave Beckett, (C) Copyright (C) 2000-2005 University of Bristol |