{
    "content": [
        {
            "type": "text",
            "text": "# RDF::Redland::Storage (perldoc)\n\n## NAME\n\nRDF::Redland::Storage - Redland RDF Storage Class\n\n## SYNOPSIS\n\nuse RDF::Redland;\nmy $storage=new RDF::Redland::Storage(\"hashes\", \"test\", \"new='yes',hash-type='memory'\");\n...\n\n## DESCRIPTION\n\nCreate objects for storing RDF::Redland::Model objects either persistently or in memory.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CONSTRUCTORS**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "RDF::Redland::Storage",
        "section": "",
        "mode": "perldoc",
        "summary": "RDF::Redland::Storage - Redland RDF Storage Class",
        "synopsis": "use RDF::Redland;\nmy $storage=new RDF::Redland::Storage(\"hashes\", \"test\", \"new='yes',hash-type='memory'\");\n...",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "CONSTRUCTORS",
                "lines": 70,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "RDF::Redland::Storage - Redland RDF Storage Class\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use RDF::Redland;\nmy $storage=new RDF::Redland::Storage(\"hashes\", \"test\", \"new='yes',hash-type='memory'\");\n...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Create objects for storing RDF::Redland::Model objects either persistently or in memory.\n",
                "subsections": []
            },
            "CONSTRUCTORS": {
                "content": "new STORAGENAME [NAME [OPTIONSSTRING]]\nCreate a new RDF::Redland::Storage object for the storage factory named *STORAGENAME* with\nstorage named *NAME* and storage options *OPTIONSSTRING* which are specific to the storage\nfactory type.\n\nThe storage options may be given either as a Perl hash or as a string. The string form are\nformatted in the form key1='value1',key2='value2' and the single quotes are required. The\nPerl hash form follows normal Perl conventions, and the boolean options use normal Perl\nconcepts of truth.\n\nCurrently defined storage options:\n\nnew='yes'\nCreate a new storage erasing any existing one (boolean, default).\n\nwrite='yes'\nProvide write access to store (boolean, default) otherwise is read only.\n\ndir='DIR'\nWork in DIR directory when creating files.\n\nmode='MODE'\nFile creation mode, default is (octal) 0644 Takes decimal (123), hex (0x123) or octal\n(0123).\n\ncontexts='yes'\nEnable statement contexts. Each statement can be stored with an optional context Node\nand the context retrieved after queries. Boolean.\n\nhash-type='TYPE' (*hashes* storage only)\nUse the TYPE hash-type for *hashes* storage. Current defined types are 'memory' and\n'bdb' but is dependent on the hash factories available.\n\nindex-predicates='yes' (*hashes* storage only)\nEnable indexing from predicates to (subject,object) which can in particular be useful\nfor rdf:type relations. Boolean.\n\nbulk='no' (*mysql* storage only)\nWhether model/storage method addstatements should be optimized, until a model/storage\nsync operation. Boolean.\n\nmerge='no' (*mysql* storage only)\nWhether to maintain a table with merged models. Boolean.\n\nExample, string form:\n\n$storage=new RDF::Redland::Storage(\"hashes\", \"test\",\n\"new='yes',hash-type='bdb',dir='.'\");\n\nExample, Perl hash form:\n\n$storage=new RDF::Redland::Storage(\"hashes\", \"test\",\n{new=>1,hash-type=>'bdb',dir=>'.'});\n\nCreates a new storage of the *hashes* type (indexed hashes) named *test* (these will be file\nnames or URIs if the storage is persistent) and with options\n*new='yes',hash-type='bdb',dir='.'* so a new storage is created with BerkeleyDB (BDB)\nkey:value hashes i.e. persistent and in the current directory.\n\nExample, Perl hash form:\n\n$storage=new RDF::Redland::Storage(\"mysql\", \"test\", {host=>'localhost',database=>'testdb',user=>'testuser',new=>0,password=>'',contexts=>1});\n\nUses an existing storage of the *mysql* type, named *test* on localhost with database name\n*testdb* using a user *testuser* and no password. Contexts are enabled.\n\nnewfromstorage STORAGE\nCreate a new RDF::Redland::Storage object from RDF::Redland::Storage *STORAGE* (copy\nconstructor). The new storage may have a new name chosen by the storage factory.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "RDF::Redland::Model\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Dave Beckett - http://www.dajobe.org/\n",
                "subsections": []
            }
        }
    }
}