[#wallet-DatabaseBatch-Write]
= xref:wallet.adoc[wallet]::xref:wallet/DatabaseBatch.adoc[DatabaseBatch]::Write
:relfileprefix: ../../
:mrdocs:

Writes a value under a key&period;

== Synopsis

Declared in `&lt;wallet&sol;db&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename K,
    typename T&gt;
bool
Write(
    K const& key,
    T const& value,
    bool fOverwrite = true);
----

== Return Value

true if the record was written&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| The key to write&period;
| *value*
| The value to store&period;
| *fOverwrite*
| Whether to overwrite an existing record&period;
|===


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