Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for parameterized queries #382

Closed
jchamberlain opened this issue Nov 8, 2016 · 1 comment
Closed

Support for parameterized queries #382

jchamberlain opened this issue Nov 8, 2016 · 1 comment

Comments

@jchamberlain
Copy link
Contributor

When I make an SQL query via the API, I'd like to optionally pass in parameters, e.g.,

{user}.carto.com/api/v2/sql/?api_key=XXXX&sql=SELECT * FROM table WHERE num > $1&params[]=5
// runs SELECT * FROM table WHERE num > 5

This helps protect against SQL injection and simplifies client code (as opposed to rolling my own string sanitization functions).

It looks like it should be a straightforward change. Is this something you would be open to if I put up a PR?

@jchamberlain
Copy link
Contributor Author

Closing as this is a duplicate of #239.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant