"deterministic" indicator for external functions.

We propose to add an optional clause to the external function
declaration to indicate whether the external function always returns the
same results for given argument values ("deterministic").

 

An example use case would be to allow users to indicate that two
external functions embedded into xquery: f:random() and
f:verySlowDeterministicExternalWebService() should be treated
differently by the query processor.

 

That can be implemented by changing FunctionDecl to

 

[26]    FunctionDecl    ::=    "declare" "function" QName "(" ParamList?
(")" | (")" "as" SequenceType)) (EnclosedExpr | ("external" (<"not"
"deterministic"> | "deterministic")?))

 

Daniel.

Received on Friday, 13 May 2005 02:14:31 UTC