You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0608]: cannot index into a value of type`db::schema::session::session::columns::data`
--> web/src/main.rs:65:55
|
65 | diesel::delete(session.filter(data["deadline"].st(now)))
| ^^^^^^^^^^^^^^^^
How can this be done? I can't seem to find any documentation that uses indexing in a query.
Versions
Rust: rustc 1.30.0-nightly (73c78734b 2018-08-05)
Diesel: "1.3.2"
serde: "1.0.70"
serde_json: "1.0.24"
Database: postgresql 10.5
Operating System: Arch Linux x86_64 4.17.12-arch1-1-ARCH
Feature Flags
diesel: "postgres", "r2d2", "serde_json", "uuid"
The text was updated successfully, but these errors were encountered:
I'm trying to remove expired sessions from a postgresql db.
The scheme looks like this:
And the table as follows:
The data field is always filled in using following (to-be extended) struct:
I wanted to index the
data.deadline
akaSessionData.deadline
field, and delete expired sessions as such:This doesn't work. It returns the compile-error
How can this be done? I can't seem to find any documentation that uses indexing in a query.
Versions
Feature Flags
The text was updated successfully, but these errors were encountered: