1RDF::Redland::Storage(3U)ser Contributed Perl DocumentatiRoDnF::Redland::Storage(3)
2
3
4

NAME

6       RDF::Redland::Storage - Redland RDF Storage Class
7

SYNOPSIS

9         use RDF::Redland;
10         my $storage=new RDF::Redland::Storage("hashes", "test", "new='yes',hash-type='memory'");
11         ...
12

DESCRIPTION

14       Create objects for storing RDF::Redland::Model objects either
15       persistently or in memory.
16

CONSTRUCTORS

18       new STORAGE_NAME [NAME [OPTIONS_STRING]]
19           Create a new RDF::Redland::Storage object for the storage factory
20           named STORAGE_NAME with storage named NAME and storage options
21           OPTIONS_STRING which are specific to the storage factory type.
22
23           The storage options may be given either as a Perl hash or as a
24           string. The string form are formatted in the form
25           key1='value1',key2='value2' and the single quotes are required. The
26           Perl hash form follows normal Perl conventions, and the boolean
27           options use normal Perl concepts of truth.
28
29           Currently defined storage options:
30
31           new='yes'
32               Create a new storage erasing any existing one (boolean,
33               default).
34
35           write='yes'
36               Provide write access to store (boolean, default) otherwise is
37               read only.
38
39           dir='DIR'
40               Work in DIR directory when creating files.
41
42           mode='MODE'
43               File creation mode, default is (octal) 0644 Takes decimal
44               (123), hex (0x123) or octal (0123).
45
46           contexts='yes'
47               Enable statement contexts.  Each statement can be stored with
48               an optional context Node and the context retrieved after
49               queries. Boolean.
50
51           hash-type='TYPE' (hashes storage only)
52               Use the TYPE hash-type for hashes storage.  Current defined
53               types are 'memory' and 'bdb' but is dependent on the hash
54               factories available.
55
56           index-predicates='yes' (hashes storage only)
57               Enable indexing from predicates to (subject,object) which can
58               in particular be useful for rdf:type relations. Boolean.
59
60           bulk='no' (mysql storage only)
61               Whether model/storage method add_statements should be
62               optimized, until a model/storage sync operation. Boolean.
63
64           merge='no' (mysql storage only)
65               Whether to maintain a table with merged models. Boolean.
66
67           Example, string form:
68
69             $storage=new RDF::Redland::Storage("hashes", "test",
70                                       "new='yes',hash-type='bdb',dir='.'");
71
72           Example, Perl hash form:
73
74             $storage=new RDF::Redland::Storage("hashes", "test",
75                                       {new=>1,hash-type=>'bdb',dir=>'.'});
76
77           Creates a new storage of the hashes type (indexed hashes) named
78           test (these will be file names or URIs if the storage is
79           persistent) and with options new='yes',hash-type='bdb',dir='.' so a
80           new storage is created with BerkeleyDB (BDB) key:value hashes i.e.
81           persistent and in the current directory.
82
83           Example, Perl hash form:
84
85             $storage=new RDF::Redland::Storage("mysql", "test", {host=>'localhost',database=>'testdb',user=>'testuser',new=>0,password=>'',contexts=>1});
86
87           Uses an existing storage of the mysql type, named test on localhost
88           with database name testdb using a user testuser and no password.
89           Contexts are enabled.
90
91       new_from_storage STORAGE
92           Create a new RDF::Redland::Storage object from
93           RDF::Redland::Storage STORAGE (copy constructor).  The new storage
94           may have a new name chosen by the storage factory.
95

SEE ALSO

97       RDF::Redland::Model
98

AUTHOR

100       Dave Beckett - http://www.dajobe.org/
101
102
103
104perl v5.28.1                      2011-02-04          RDF::Redland::Storage(3)
Impressum