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

Julian Hyde commented on CALCITE-1671:
--------------------------------------

I think this will turn into two issues: first, support named bind parameters in 
Avatica, and second, for Calcite to support named bind parameters (populating 
the Avatica metadata).

Calcite will need to choose some syntax for parameters; Avatica won't care. I 
am leaning towards '@' (rather than ':') because that is what SQL Server uses, 
and Microsoft also defines ODBC and ADO.NET.

I don't know whether we'd be able to expose named parameters in Avatica's JDBC 
driver. JDBC supports named parameters in CallableStatement (intended for 
prepared procedure calls) but not in PreparedStatement (intended for prepared 
queries and DML commands). But we can support named parameters in Avatica even 
if we don't support them in the JDBC driver.

> Support for named bind parameters
> ---------------------------------
>
>                 Key: CALCITE-1671
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1671
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: Francis Chuang
>            Assignee: Julian Hyde
>            Priority: Minor
>
> As discussed on the mailing list, there is some interest in supporting named 
> bind parameters:
> {code}
> SELECT * FROM my_table WHERE my_column > :parameter1 AND mycolumn2 > 
> :parameter2
> {code}
> Will mixing of named and unnamed parameters be allowed?
> {code}
> SELECT * FROM my_table WHERE my_column > :parameter1 AND mycolumn2 > ? AND 
> mycolumn3 > :parameter3
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to