Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 #include "mozIStorageValueArray.idl"
10 interface mozIStorageConnection;
11 interface nsIArray;
12 interface nsIVariant;
14 /**
15 * mozIStorageFunction is to be implemented by storage consumers that
16 * wish to receive callbacks during the request execution.
17 *
18 * SQL can apply functions to values from tables. Examples of
19 * such functions are MIN(a1,a2) or SQRT(num). Many functions are
20 * implemented in SQL engine.
21 *
22 * This interface allows consumers to implement their own,
23 * problem-specific functions.
24 * These functions can be called from triggers, too.
25 *
26 */
27 [scriptable, function, uuid(9ff02465-21cb-49f3-b975-7d5b38ceec73)]
28 interface mozIStorageFunction : nsISupports {
29 /**
30 * onFunctionCall is called when execution of a custom
31 * function should occur.
32 *
33 * @param aNumArguments The number of arguments
34 * @param aFunctionArguments The arguments passed in to the function
35 *
36 * @returns any value as Variant type.
37 */
39 nsIVariant onFunctionCall(in mozIStorageValueArray aFunctionArguments);
40 };