-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Macro fails on bytes data #57
Comments
I'm not sure if it's exactly the same problem but it seems to fail with other type like UUID (user_id: uuid::Uuid) and the hash (from the example, passed as hash: String) too.
Using PostgreSQL. I can't print the value because the query check seems to happen before it, would it be possible to log/debug the prepared request with sqlx? |
We plan to add debug logging to SQLx that will print the query if you turn it on. Your primary issue though is you need to turn on the See https://github.com/launchbadge/sqlx/blob/master/README.md#cargo-feature-flags for more flags as well. |
As to the OP, the query macro does not support bytes yet because of a small oversight. We'll correct and make a patch release shortly. |
Fixed and released as v0.2.2 |
I'll read the README more often, thanks for updating this that often. |
confirmed works in 0.2.2 |
For table called my_table with id -> Integer, value-> Integer and data->BYTEA (Postgress)
the following macro seems to fail when trying to insert a record (without BYTEA it seemed to work)
Fails with: "error: "unknown type param ID: 17""
This works fine:
The text was updated successfully, but these errors were encountered: