| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 | <title>Store 'memory'</title> |
| 6 | <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> |
| 7 | <link rel="home" href="index.html" title="Redland RDF Library Manual"> |
| 8 | <link rel="up" href="redland-storage-modules.html" title="Storage Modules"> |
| 9 | <link rel="prev" href="redland-storage-module-hashes.html" title="Store 'hashes'"> |
| 10 | <link rel="next" href="redland-storage-module-file.html" title="Store 'file'"> |
| 11 | <meta name="generator" content="GTK-Doc V1.18 (XML mode)"> |
| 12 | <link rel="stylesheet" href="style.css" type="text/css"> |
| 13 | </head> |
| 14 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 15 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> |
| 16 | <td><a accesskey="p" href="redland-storage-module-hashes.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| 17 | <td><a accesskey="u" href="redland-storage-modules.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| 18 | <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| 19 | <th width="100%" align="center">Redland RDF Library Manual</th> |
| 20 | <td><a accesskey="n" href="redland-storage-module-file.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| 21 | </tr></table> |
| 22 | <div class="section"> |
| 23 | <div class="titlepage"><div><div><h2 class="title" style="clear: both"> |
| 24 | <a name="redland-storage-module-memory"></a>Store 'memory'</h2></div></div></div> |
| 25 | <p>This module is always present (cannot be removed) and provides a |
| 26 | simple and fast in-memory store with no persistence. It is |
| 27 | the default store if no store name is given to the storage |
| 28 | constructors.</p> |
| 29 | <p>The memory store is not suitable for large in-memory models since |
| 30 | it does not do any indexing. For that, use the |
| 31 | <a class="xref" href="redland-storage-module-hashes.html" title="Store 'hashes'">the section called “Store 'hashes'”</a> with |
| 32 | <code class="literal">hash-type</code> of <code class="literal">memory</code>.</p> |
| 33 | <p>The module provides optional contexts support enabled when |
| 34 | boolean storage option <code class="literal">contexts</code> is set.</p> |
| 35 | <p>Examples:</p> |
| 36 | <pre class="programlisting"> |
| 37 | /* Explicitly named memory storage */ |
| 38 | storage=librdf_new_storage(world, "memory", NULL, NULL); |
| 39 | |
| 40 | /* Default storage type, which is memory */ |
| 41 | storage=librdf_new_storage(world, NULL, NULL, NULL); |
| 42 | |
| 43 | /* In-memory store with contexts */ |
| 44 | storage=librdf_new_storage(world, NULL, NULL, "contexts='yes'"); |
| 45 | </pre> |
| 46 | <p>Summary:</p> |
| 47 | <div class="itemizedlist"><ul class="itemizedlist" type="disc"> |
| 48 | <li class="listitem"><p>In-memory</p></li> |
| 49 | <li class="listitem"><p>Fast</p></li> |
| 50 | <li class="listitem"><p>Suitable for small models</p></li> |
| 51 | <li class="listitem"><p>No indexing</p></li> |
| 52 | <li class="listitem"><p>No persistence</p></li> |
| 53 | <li class="listitem"><p>Optional contexts (with option <code class="literal">contexts</code> set)</p></li> |
| 54 | </ul></div> |
| 55 | </div> |
| 56 | <div class="footer"> |
| 57 | <hr> |
| 58 | Generated by GTK-Doc V1.18</div> |
| 59 | </body> |
| 60 | </html> |