45 lines
1.1 KiB
HTML
45 lines
1.1 KiB
HTML
<div class="section">
|
|
<h2><a href="/docs/#sdk">SDK</a> : Transaction</h2>
|
|
|
|
<pre>
|
|
<code class="language-javascript">userbase.transaction(databaseName, operations)
|
|
.then(() => {
|
|
|
|
})
|
|
.catch((e) => console.error(e))</code>
|
|
</pre>
|
|
|
|
<h3 id="params">Parameters</h3>
|
|
|
|
<ul>
|
|
<li>
|
|
<span class="field">databaseName</span> [string | Len: 1-50] - The database name to use.
|
|
</li>
|
|
<li>
|
|
<span class="field">operations</span> [Array] - The Insert, Update, or Delete operations to execute in an atomic transaction.
|
|
</li>
|
|
</ul>
|
|
|
|
<h3 id="errors">Errors</h3>
|
|
|
|
<ul>
|
|
<li>DatabaseNotOpen</li>
|
|
<li>DatabaseNameCannotBeBlank</li>
|
|
<li>DatabaseNameTooLong</li>
|
|
<li>DatabaseNameMustBeString</li>
|
|
<li>OperationsMustBeArray</li>
|
|
<li>ItemIdCannotBeBlank</li>
|
|
<li>ItemIdTooLong</li>
|
|
<li>ItemIdMustBeString</li>
|
|
<li>ItemTooLarge</li>
|
|
<li>ItemAlreadyExists</li>
|
|
<li>ItemDoesNotExist</li>
|
|
<li>ItemUpdateConflict</li>
|
|
<li>AppIdNotSet</li>
|
|
<li>AppIdNotValid</li>
|
|
<li>ServiceUnavailable</li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<hr> |