michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim: sw=2 ts=2 sts=2 expandtab michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "mozIStorageBaseStatement.idl" michael@0: michael@0: /** michael@0: * An asynchronous SQL statement. This differs from mozIStorageStatement by michael@0: * only being usable for asynchronous execution. (mozIStorageStatement can michael@0: * be used for both synchronous and asynchronous purposes.) This specialization michael@0: * for asynchronous operation allows us to avoid needing to acquire michael@0: * synchronization primitives also used by the asynchronous execution thread. michael@0: * In contrast, mozIStorageStatement may need to acquire the primitives and michael@0: * consequently can cause the main thread to lock for extended intervals while michael@0: * the asynchronous thread performs some long-running operation. michael@0: */ michael@0: [scriptable, uuid(52e49370-3b2e-4a27-a3fc-79e20ad4056b)] michael@0: interface mozIStorageAsyncStatement : mozIStorageBaseStatement { michael@0: /* michael@0: * 'params' provides a magic JS helper that lets you assign parameters by michael@0: * name. Unlike the helper on mozIStorageStatement, you cannot enumerate michael@0: * in order to find out what parameters are legal. michael@0: * michael@0: * This does not work for BLOBs. You must use an explicit binding API for michael@0: * that. michael@0: * michael@0: * example: michael@0: * stmt.params.foo = 1; michael@0: * stmt.params["bar"] = 2; michael@0: * let argName = "baz"; michael@0: * stmt.params[argName] = 3; michael@0: * michael@0: * readonly attribute nsIMagic params; michael@0: */ michael@0: };