2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2010-03-24 00:32:40 -07:00
|
|
|
#include "mozIStorageValueArray.idl"
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
interface mozIStorageConnection;
|
|
|
|
interface nsIArray;
|
2007-07-07 14:14:51 -07:00
|
|
|
interface nsIVariant;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* mozIStorageFunction is to be implemented by storage consumers that
|
2007-07-07 14:14:51 -07: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.
|
|
|
|
*
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2009-08-06 11:00:39 -07:00
|
|
|
[scriptable, function, uuid(9ff02465-21cb-49f3-b975-7d5b38ceec73)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface mozIStorageFunction : nsISupports {
|
|
|
|
/**
|
|
|
|
* onFunctionCall is called when execution of a custom
|
2007-07-07 14:14:51 -07:00
|
|
|
* function should occur.
|
2007-03-22 10:30:00 -07:00
|
|
|
*
|
|
|
|
* @param aNumArguments The number of arguments
|
|
|
|
* @param aFunctionArguments The arguments passed in to the function
|
2007-07-07 14:14:51 -07:00
|
|
|
*
|
|
|
|
* @returns any value as Variant type.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
|
|
|
|
2007-07-07 14:14:51 -07:00
|
|
|
nsIVariant onFunctionCall(in mozIStorageValueArray aFunctionArguments);
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|