Accept bind query param with integer index
See original GitHub issueCurrent scenario
Right now, it is only possible to receive String as bind param: https://github.com/r2dbc/r2dbc-h2/blob/84c0b910a6e75514fcbd4b4014e073bb0f0cccf9/src/main/java/io/r2dbc/h2/H2Statement.java#L68-L73
This code accept as valid input:
bind("?1", 100)
bind("$1", 100)
What we need to improve
We should support integers as bind params, like:
bind(0, 100)
Requirements are:
- update the bind method to support string or integer
- update the method
getIndex
to support both approaches (https://github.com/r2dbc/r2dbc-h2/blob/84c0b910a6e75514fcbd4b4014e073bb0f0cccf9/src/main/java/io/r2dbc/h2/H2Statement.java#L146) - update the read-me and mention that integer is also allowed (https://github.com/r2dbc/r2dbc-h2/blob/84c0b910a6e75514fcbd4b4014e073bb0f0cccf9/README.adoc#programmatic)
- add tests that covers an input bind param as integer
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
failing to bind string indexed query string parameters
seems like no one has an answer for this, so i took a different route and wrote my own custom binder, if a...
Read more >SQL Bind Variables/Parameters in Databases
Bind parameters —also called dynamic parameters or bind variables—are an alternative way to pass data to the database. Instead of putting the values...
Read more >Using Query Bind Parameters | Geode Docs
Using query bind parameters in Geode queries is similar to using prepared statements in SQL where parameters can be set during query execution....
Read more >Bind QueryString to Action Method in ASP.NET MVC
Bind Query String to an Action Method Parameters in MVC. Here, you will learn about to bind a model object to an action...
Read more >Query parameter data types and performance - CYBERTEC
How do query parameter data types affect performance? ... Such a placeholder is called a query parameter (also known as a bind variable)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @uaihebert!
Resolved viahttps://github.com/r2dbc/r2dbc-h2/commit/e1d498f1d8206071c2cf3bcf95a660b0565bf6c3.