2004-10-09 04:04:10 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2004-10-09 04:04:10 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2010-03-24 10:32:40 +03:00
|
|
|
#include "mozIStorageValueArray.idl"
|
|
|
|
|
2004-10-09 04:04:10 +04:00
|
|
|
interface mozIStorageConnection;
|
|
|
|
interface nsIArray;
|
2007-07-08 01:14:51 +04:00
|
|
|
interface nsIVariant;
|
2004-10-09 04:04:10 +04:00
|
|
|
|
2005-11-15 03:35:50 +03:00
|
|
|
/**
|
|
|
|
* mozIStorageFunction is to be implemented by storage consumers that
|
2007-07-08 01:14:51 +04:00
|
|
|
* wish to receive callbacks during the request execution.
|
|
|
|
*
|
|
|
|
* SQL can apply functions to values from tables. Examples of
|
|
|
|
* such functions are MIN(a1,a2) or SQRT(num). Many functions are
|
|
|
|
* implemented in SQL engine.
|
|
|
|
*
|
|
|
|
* This interface allows consumers to implement their own,
|
|
|
|
* problem-specific functions.
|
|
|
|
* These functions can be called from triggers, too.
|
|
|
|
*
|
2005-11-15 03:35:50 +03:00
|
|
|
*/
|
2009-08-06 22:00:39 +04:00
|
|
|
[scriptable, function, uuid(9ff02465-21cb-49f3-b975-7d5b38ceec73)]
|
2004-10-09 04:04:10 +04:00
|
|
|
interface mozIStorageFunction : nsISupports {
|
|
|
|
/**
|
|
|
|
* onFunctionCall is called when execution of a custom
|
2007-07-08 01:14:51 +04:00
|
|
|
* function should occur.
|
2019-05-23 01:37:14 +03:00
|
|
|
*
|
2004-10-09 04:04:10 +04:00
|
|
|
* @param aNumArguments The number of arguments
|
|
|
|
* @param aFunctionArguments The arguments passed in to the function
|
2007-07-08 01:14:51 +04:00
|
|
|
*
|
|
|
|
* @returns any value as Variant type.
|
2004-10-09 04:04:10 +04:00
|
|
|
*/
|
|
|
|
|
2007-07-08 01:14:51 +04:00
|
|
|
nsIVariant onFunctionCall(in mozIStorageValueArray aFunctionArguments);
|
2004-10-09 04:04:10 +04:00
|
|
|
};
|