[db] Implement rusqlite::types::FromSql for NamespacedKeyword #136

Open
opened 2020-08-06 16:55:31 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:55:31 +00:00 (Migrated from github.com)

via @ncalexan 0058e4b968..7b760a8035 (r101842811)

It's possible to make let ident: NamespacedKeyword = row.get(0) just work, by implementing rusqlite::types::FromSql. However, that's awkward because the type is in the edn crate and the trait is in the rusqlite trait. It might be worth newtyping this to be automatic, but we can do that as follow-up. This might just get better with your next ticket, too.

via @ncalexan https://github.com/mozilla/mentat/pull/300/files/0058e4b968a62eea2389f80f999180644d74c692..7b760a8035c656c58686cc82b3a60c7ef1069a19#r101842811 > It's possible to make let ident: NamespacedKeyword = row.get(0) just work, by implementing rusqlite::types::FromSql. However, that's awkward because the type is in the edn crate and the trait is in the rusqlite trait. It might be worth newtyping this to be automatic, but we can do that as follow-up. This might just get better with your next ticket, too.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#136
No description provided.