RDF::Redland::Storage(3pm) | User Contributed Perl Documentation | RDF::Redland::Storage(3pm) |
RDF::Redland::Storage - Redland RDF Storage Class
use RDF::Redland; my $storage=new RDF::Redland::Storage("hashes", "test", "new='yes',hash-type='memory'"); ...
Create objects for storing RDF::Redland::Model objects either persistently or in memory.
The storage options may be given either as a Perl hash or as a string. The string form are formatted in the form key1='value1',key2='value2' and the single quotes are required. The Perl hash form follows normal Perl conventions, and the boolean options use normal Perl concepts of truth.
Currently defined storage options:
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.
RDF::Redland::Model
Dave Beckett - http://www.dajobe.org/
2023-01-31 | perl v5.36.0 |