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

select! shouldn't consume parameters #5

Closed
trevyn opened this issue Jan 13, 2021 · 1 comment
Closed

select! shouldn't consume parameters #5

trevyn opened this issue Jan 13, 2021 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@trevyn
Copy link
Owner

trevyn commented Jan 13, 2021

This consumes row, but shouldn't:

select!(PersonIntegrationTest "WHERE name = ?", row.name.unwrap())

Workaround:

select!(PersonIntegrationTest "WHERE name = ?", row.clone().name.unwrap())
@trevyn trevyn added good first issue Good for newcomers bug Something isn't working labels Jan 13, 2021
@trevyn
Copy link
Owner Author

trevyn commented Feb 8, 2022

This is not a Turbosql bug; the unwrap() is doing the consuming. Use:

select!(PersonIntegrationTest "WHERE name = ?", row.name.as_ref().unwrap())

@trevyn trevyn closed this as completed Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant