storage/public/mozIStorageAsyncStatement.idl

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     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.
    18  */
    19 [scriptable, uuid(52e49370-3b2e-4a27-a3fc-79e20ad4056b)]
    20 interface mozIStorageAsyncStatement : mozIStorageBaseStatement {
    21   /*
    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.
    25    *
    26    * This does not work for BLOBs.  You must use an explicit binding API for
    27    * that.
    28    *
    29    * example:
    30    *  stmt.params.foo = 1;
    31    *  stmt.params["bar"] = 2;
    32    *  let argName = "baz";
    33    *  stmt.params[argName] = 3;
    34    *
    35    * readonly attribute nsIMagic params;
    36    */
    37 };

mercurial