You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Dmitry Lychagin (JIRA)" <ji...@apache.org> on 2018/06/13 00:34:00 UTC

[jira] [Created] (ASTERIXDB-2401) Support parameterized queries

Dmitry Lychagin created ASTERIXDB-2401:
------------------------------------------

             Summary: Support parameterized queries 
                 Key: ASTERIXDB-2401
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2401
             Project: Apache AsterixDB
          Issue Type: Improvement
          Components: SQL - Translator SQL++
            Reporter: Dmitry Lychagin
            Assignee: Dmitry Lychagin


We need to support external statement parameters in SQL++. They can be of three kinds:
1) Named parameters, referred as: $name

2) Positional parameters, referred as: $n where n is an integer, >= 1

3) Positional parameters, referred as ?, which are treated as $1, ... $n in the order in which they appear in the statement.

Parameters should be assignable through the statement execution API (/query/service). 

For each named parameter there should be a request parameter "$name" which contains the parameter's JSON value.

Positional parameters are passed in "args" request parameter which should be a JSON array containing parameter values.

Statement parameters should be inlined at query compilation time, so they do not impact query optimization.

It's an error if a statement parameter is referred by a query but its value is not provided in the API request.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)