[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16513961#comment-16513961
 ] 

ASF subversion and git services commented on ASTERIXDB-2401:
------------------------------------------------------------

Commit 1bdf80821c861c509ce21d75b0d5676cffdb4af8 in asterixdb's branch 
refs/heads/master from [~dlychagin-cb]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=1bdf808 ]

[ASTERIXDB-2401][SQLPP] Support parameterized queries

- user model changes: yes
- storage format changes: no
- interface changes: yes

Details:
- Support statement parameters: named ($name) and positional ($1 or ?)
- Enhance query service API to accept these parameters in the request
- Remove [?] index accessor from SQL++ grammar because it conflicts
  with positional parameters ([0] can be used instead)
- Add testcases for parameterized queries

Change-Id: Ia612f731cd2370fccd54c4796bd9787fbea16766
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2707
Tested-by: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenk...@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <ti...@apache.org>


> 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
>            Priority: Major
>
> 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)

Reply via email to