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

Differing results #195

Open
ahopkins opened this issue Apr 25, 2020 · 0 comments
Open

Differing results #195

ahopkins opened this issue Apr 25, 2020 · 0 comments

Comments

@ahopkins
Copy link

@ahopkins ahopkins commented Apr 25, 2020

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')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant