SqlScalarFunction QML Type

Executes scalar functions. More...

Import Statement: import ArcGIS.AppFramework.Sql 1.0
Inherits:

SqlAbstractFunction

Properties

Detailed Description

The SqlScalarFunction component inherits the name, argumentTypes and deterministic properties from SqlAbstractSocket, which it is a child of. Use SqlScalarFunction to execute JavaScript methods.

This code sample demonstrates usage of the SqlScalarFunction component, declaring a function named 'multiply' that accepts two parameters, returning the result of multiplying them.

SqlDatabase {

    SqlScalarFunction {
        name: "multiply"
        argumentTypes: ["real", "real"]

        method: function (value1, value2) {
            return value1 * value2;
        }
    }
}

This example SQL statement uses this function.

SELECT col1, col2, multiply(col1, col2)
FROM myTable

Property Documentation

method : var

Calls a JavaScript method.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.