databases
databases copied to clipboard
Differing results
I am playing around with this project (making a wrapper around it) and came across an odd behavior.
Using the example on the README:
The following two queries do not provide the same result:
query = "SELECT id, name FROM Players ORDER BY name"
async for row in database.iterate(query=query):
print(row)
print("---")
query = "SELECT id, name FROM Players ORDER BY :order_by"
async for row in database.iterate(
query=query, values={"order_by": "name"}
):
print(row)
The output:
(3, 'Carol')
(1, 'Daisy')
(2, 'Neil')
---
(1, 'Daisy')
(2, 'Neil')
(3, 'Carol')