Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * vim: sw=2 ts=2 sts=2 expandtab |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "mozIStorageBaseStatement.idl" |
michael@0 | 8 | |
michael@0 | 9 | /** |
michael@0 | 10 | * An asynchronous SQL statement. This differs from mozIStorageStatement by |
michael@0 | 11 | * only being usable for asynchronous execution. (mozIStorageStatement can |
michael@0 | 12 | * be used for both synchronous and asynchronous purposes.) This specialization |
michael@0 | 13 | * for asynchronous operation allows us to avoid needing to acquire |
michael@0 | 14 | * synchronization primitives also used by the asynchronous execution thread. |
michael@0 | 15 | * In contrast, mozIStorageStatement may need to acquire the primitives and |
michael@0 | 16 | * consequently can cause the main thread to lock for extended intervals while |
michael@0 | 17 | * the asynchronous thread performs some long-running operation. |
michael@0 | 18 | */ |
michael@0 | 19 | [scriptable, uuid(52e49370-3b2e-4a27-a3fc-79e20ad4056b)] |
michael@0 | 20 | interface mozIStorageAsyncStatement : mozIStorageBaseStatement { |
michael@0 | 21 | /* |
michael@0 | 22 | * 'params' provides a magic JS helper that lets you assign parameters by |
michael@0 | 23 | * name. Unlike the helper on mozIStorageStatement, you cannot enumerate |
michael@0 | 24 | * in order to find out what parameters are legal. |
michael@0 | 25 | * |
michael@0 | 26 | * This does not work for BLOBs. You must use an explicit binding API for |
michael@0 | 27 | * that. |
michael@0 | 28 | * |
michael@0 | 29 | * example: |
michael@0 | 30 | * stmt.params.foo = 1; |
michael@0 | 31 | * stmt.params["bar"] = 2; |
michael@0 | 32 | * let argName = "baz"; |
michael@0 | 33 | * stmt.params[argName] = 3; |
michael@0 | 34 | * |
michael@0 | 35 | * readonly attribute nsIMagic params; |
michael@0 | 36 | */ |
michael@0 | 37 | }; |