django-devserver icon indicating copy to clipboard operation
django-devserver copied to clipboard

sql logger should quote query params

Open jla415 opened this issue 15 years ago • 1 comments

It would be nice if the sql logger would quote params in the printed queries to make it easier to copy/paste into a CLI client for closer optimization/examination.

Eg instead of:

sql SELECT ... FROM foo WHERE foo.name = bob sql Found 1 matching rows

it would print:

sql SELECT ... FROM foo WHERE foo.name = "bob" sql Found 1 matching rows

jla415 avatar May 13 '10 23:05 jla415

In addition to making this easier to reuse, it would fix an actual bug in the display where data values are processed as if they're part of the actual query:

NATIONAL-archives-AND-records-administration

instead of:

'national-archives-and-records-administration'

acdha avatar Nov 07 '12 21:11 acdha