storage/public/mozIStorageAggregateFunction.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #include "nsISupports.idl"
     8 interface mozIStorageConnection;
     9 interface mozIStorageValueArray;
    10 interface nsIArray;
    11 interface nsIVariant;
    13 /**
    14  * mozIStorageAggregateFunction represents aggregate SQL function.
    15  * Common examples of aggregate functions are SUM() and COUNT().
    16  *
    17  * An aggregate function calculates one result for a given set of data, where
    18  * a set of data is a group of tuples. There can be one group
    19  * per request or many of them, if GROUP BY clause is used or not.
    20  */
    21 [scriptable, uuid(763217b7-3123-11da-918d-000347412e16)]
    22 interface mozIStorageAggregateFunction : nsISupports {
    23   /**
    24    * onStep is called when next value should be passed to
    25    * a custom function.
    26    * 
    27    * @param aFunctionArguments    The arguments passed in to the function
    28    */
    29   void onStep(in mozIStorageValueArray aFunctionArguments);
    31   /**
    32    * Called when all tuples in a group have been processed and the engine
    33    * needs the aggregate function's value.
    34    *
    35    * @returns aggregate result as Variant.
    36    */
    37   nsIVariant onFinal();
    38 };

mercurial