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.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close