question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to generate parameterized queries/prepared statements

See original GitHub issue

Hi, I was looking into this library during a refactor of a legacy, jquery-based frontend. This one looks pretty similar to one of the components there, but I can’t seem to find the functionality that would output a parameterized query, that would be safer to execute, similar to what the original does here (search for ‘question_mark’ to see what I mean, specifically)

I need to be able to get the query in a format similar to something like


{
  sql: 'author LIKE ? AND publish_date BETWEEN ? AND ?',
  params: ['%Tolkien%', '1954/01/01', '1956/01/01']
}

Can this library do something like this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mwozniczakcommented, May 29, 2020

@jakeboone02 yup, upgraded to it today, and it works like a charm!

0reactions
jakeboone02commented, May 28, 2020

@mwozniczak this feature has been released as part of v3.2.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Confusion between prepared statement and parameterized ...
A parametrized query is a single operation which generates a prepared statement internally, then passes in your parameters and executes.
Read more >
Mitigation of SQL Injection Attack using Prepared Statements ...
The vulnerability can be mitigated using a prepared statement to create a parameterized query as follows: Java.
Read more >
Using parameterized queries - Amazon Athena
You can use a prepared statement for repeated execution of the same query with different query parameters. A prepared statement contains parameter placeholders ......
Read more >
How and Why to Use Parameterized Queries
A parameterized query is a query in which placeholders are used for parameters and the parameter values are supplied at execution time.
Read more >
SQL Injection Prevention - OWASP Cheat Sheet Series
Use prepared statements and parameterized queries. These are SQL statements that are sent to and parsed by the database server separately from any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found