Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / storage / mozIStorageAsyncStatement.idl
blobde7369fcaae93d0ebc541a668f34bf50ede31ea0
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: sw=2 ts=2 sts=2 expandtab
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "mozIStorageBaseStatement.idl"
9 /**
10 * An asynchronous SQL statement. This differs from mozIStorageStatement by
11 * only being usable for asynchronous execution. (mozIStorageStatement can
12 * be used for both synchronous and asynchronous purposes.) This specialization
13 * for asynchronous operation allows us to avoid needing to acquire
14 * synchronization primitives also used by the asynchronous execution thread.
15 * In contrast, mozIStorageStatement may need to acquire the primitives and
16 * consequently can cause the main thread to lock for extended intervals while
17 * the asynchronous thread performs some long-running operation.
19 [scriptable, builtinclass, uuid(52e49370-3b2e-4a27-a3fc-79e20ad4056b)]
20 interface mozIStorageAsyncStatement : mozIStorageBaseStatement {
22 * 'params' provides a magic JS helper that lets you assign parameters by
23 * name. Unlike the helper on mozIStorageStatement, you cannot enumerate
24 * in order to find out what parameters are legal.
26 * This does not work for BLOBs. You must use an explicit binding API for
27 * that.
29 * example:
30 * stmt.params.foo = 1;
31 * stmt.params["bar"] = 2;
32 * let argName = "baz";
33 * stmt.params[argName] = 3;
35 * readonly attribute nsIMagic params;