Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 415195 of IDBFactorySync

  • Revision slug: Web/API/IDBFactorySync
  • Revision title: IDBFactorySync
  • Revision id: 415195
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 8 words removedIndexedDB/IDBFactorySync Web/API/IDBFactorySync

Revision Content

{{ draft() }}

The IDBFactorySync interface of the IndexedDB API provide a synchronous means of accessing the capabilities of indexed databases.

Method overview

IDBDatabaseSync open (in DOMString name, in DOMString description, in optional boolean modifyDatabase) raises (IDBDatabaseException);

Methods

open()

Opens and returns a connection to a database. Blocks the calling thread until the connection object is ready to return. If there is already a database with the specified name, it uses that one; otherwise, it creates the database using the specified name and description.

IDBDatabaseSync open (
  in DOMString name, 
  in DOMString description
) raises (IDBDatabaseException);
Parameters
name
The name for the database.
description
The description for the database.
Returns
IDBDatabaseSync
An object to access the open database.
Exceptions

This method can raise an IDBDatabaseException with the following codes:

NON_TRANSIENT_ERR
If the name parameter is not valid. A valid name is any string including the empty string.
UNKNOWN_ERR
If an error occurs while the database is being opened.

Revision Source

<p>{{ draft() }}</p>
<p>The <code>IDBFactorySync</code> interface of the <a href="/en/IndexedDB" title="en/IndexedDB">IndexedDB API</a> provide a synchronous means of accessing the capabilities of indexed databases.</p>
<h2 id="Method_overview">Method overview</h2>
<table class="standard-table"> <tbody> <tr> <td><code><a href="/en/IndexedDB/IDBDatabaseSync" title="en/IndexedDB/IDBDatabaseSync">IDBDatabaseSync</a> <a href="#open" title="#open">open</a> (in DOMString name, in DOMString description, in optional boolean modifyDatabase) raises (<a href="/en/IndexedDB/IDBDatabaseException" title="en/IndexedDB/IDBDatabaseException">IDBDatabaseException</a>);</code></td> </tr> </tbody>
</table>
<h2 id="Methods">Methods</h2>
<h3 id="open" name="open">open()</h3>
<p>Opens and returns a <a href="/en/IndexedDB#gloss_database_connection" title="en/IndexedDB#gloss database connection">connection to a database</a>. Blocks the calling thread until the connection object is ready to return. If there is already a database with the specified name, it uses that one; otherwise, it creates the database using the specified name and description.</p>
<pre>IDBDatabaseSync open (
  in DOMString name, 
  in DOMString description
) raises (IDBDatabaseException);
</pre>
<h5 id="Parameters">Parameters</h5>
<dl> <dt>name</dt> <dd>The name for the database.</dd> <dt>description</dt> <dd>The description for the database.</dd>
</dl>
<h5 id="Returns">Returns</h5>
<dl> <dt><code><a href="/en/IndexedDB/IDBDatabaseSync" title="en/IndexedDB/DatabaseSync">IDBDatabaseSync</a></code></dt> <dd>An object to access the open database.</dd>
</dl>
<h5 id="Exceptions">Exceptions</h5>
<p>This method can raise an IDBDatabaseException with the following codes:</p>
<dl> <dt><code><a href="/en/IndexedDB/IDBDatabaseException#NON_TRANSIENT_ERR" title="en/IndexedDB/DatabaseException#NON TRANSIENT ERR">NON_TRANSIENT_ERR</a></code></dt> <dd>If the <code>name</code> parameter is not valid. A valid name is any string including the empty string.</dd> <dt><code><a href="/en/IndexedDB/IDBDatabaseException#UNKNOWN_ERR" title="en/IndexedDB/DatabaseException#UNKNOWN ERR">UNKNOWN_ERR</a></code></dt> <dd>If an error occurs while the database is being opened.</dd>
</dl>
Revert to this revision