[#BaseIndex-DB-2constructor]
= xref:BaseIndex.adoc[BaseIndex]::xref:BaseIndex/DB.adoc[DB]::DB
:relfileprefix: ../../
:mrdocs:

Open the index database at the given path&period;

== Synopsis

Declared in `&lt;index&sol;base&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
DB(
    xref:fs/path.adoc[fs::path] const& path,
    size&lowbar;t n&lowbar;cache&lowbar;size,
    bool f&lowbar;memory = false,
    bool f&lowbar;wipe = false,
    bool f&lowbar;obfuscate = false,
    bool f&lowbar;bloom = true);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *path*
| Directory where the database is stored&period;
| *n&lowbar;cache&lowbar;size*
| Size of the LevelDB in&hyphen;memory cache, in bytes&period;
| *f&lowbar;memory*
| Keep the database in memory instead of on disk&period;
| *f&lowbar;wipe*
| Erase any existing database before opening&period;
| *f&lowbar;obfuscate*
| Obfuscate the on&hyphen;disk data with a random key&period;
| *f&lowbar;bloom*
| Enable the LevelDB bloom filter&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
