Replies: 4 comments 2 replies
-
|
I never used |
Beta Was this translation helpful? Give feedback.
-
|
Not an answer, but work around when dealing with a table with #[derive(Debug, FromQueryResult)]
struct MovieSearchResult {
id: i64,
name: String,
desc: String,
}
let res = MovieSearchResult::find_by_statement(Statement::from_sql_and_values(
DbBackend::Postgres,
r#"
select id, name, desc
from cinema.movies
where desc_tsvector @@ to_tsquery('english', $1);
"#,
[search_str.into()],
))
.all(&conn)
.await; |
Beta Was this translation helpful? Give feedback.
-
|
Not sure if anyone is still interested, but I believe this first needs to be supported by Also, we need support from sqlx because we also need to create queries in |
Beta Was this translation helpful? Give feedback.
-
|
Closed in favour of #2750 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I'm using a postgres data model I tend to use for demos (some fictional data about movie rentals), and one of the tables has a column of type 'tsvector'
When I generate the ORM source, it looks like this:
(The data + data model is open source, available here: but I don't think it is anything special.
When querying a record of this type I get this panic:
So it looks like String isn't the right type, but I'm unsure what is, and if sqlx supports it at all. I can comment out this column for now, then it all works.
But I'd say it would be better to ignore this type, as it breaks the entire table.
Steps to Reproduce
Expected Behavior
The result of that type
Actual Behavior
A panic
Reproduces How Often
Always
Versions
Beta Was this translation helpful? Give feedback.
All reactions