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.

String output vs. parameterized

See original GitHub issue

Triple checked the docs and source code, is there a way to output a full query string? eg:

const min = 20, max = 30
const People = sq.l`select * from person where age >= ${min} and age < ${max}`

People.query
{ text: 'select * from person where age >= $1 and age < $2',
  args: [20, 30] }

// Sample API
People.query.toString()
'select * from person where age >= 20 and age < 30'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
eejdoowadcommented, Dec 3, 2018

Resolved in Sqorn v0.0.40. Use method .unparameterized.

0reactions
eejdoowadcommented, Dec 3, 2018

The implementation was easy because I just copy-pasted Node-Postgres’s string escape function. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Built-in string formatting vs string concatenation as logging ...
String concatenation means LOGGER.info("The program started at " + new Date()); ... So, It's recommended to use parameterized logging as the ...
Read more >
string interpolation - format string output - Microsoft Learn
To identify a string literal as an interpolated string, prepend it with the $ symbol. You can't have any white space between the...
Read more >
What's the Top Java Logging Method on GitHub? String ...
Parameterized logging is the popular choice in INFO log level, with 37% of statements. The clear pattern here is that as we move...
Read more >
Python String Formatting Best Practices
Learn the four main approaches to string formatting in Python, as well as their strengths and weaknesses. You'll also get a simple rule...
Read more >
1.3.4 String concatenation vs. format | GEOG 489
In GEOG 485, we used the + operator for string concatenation to produce strings from multiple components to then print them out or...
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