Scripting

JAVASCRIPT

JAVASCRIPT(code, arg1, arg2, arg3, …)

JS(code, arg1, arg2, arg3, …)

Executes javascript defined in the code. The arguments are optional. Arguments can be accessed in the function body using arg1, arg2argN syntax.

output type:VARIANT

Example

1
select(JAVASCRIPT("return arg1 + arg2",  1,2));
js
3.0

JAVASCRIPT_TYPED

JAVASCRIPT_TYPED(return_type, code, arg1, arg2, arg3, …)

JS_TYPED(return_type, code, arg1, arg2, arg3, …)

Executes javascript defined in the code returning the value specified by return_type. The arguments are optional. Arguments can be accessed in the function body using arg1, arg2argN syntax.

output type:as specified by return_type

Example

1
select(JAVASCRIPT_TYPED(LONG, "return arg1 + arg2",  1,2));
js_typed
3