From<Option<String>>/From<Option<i64>> for Param (L8/L10 clearable columns)
Browse files at this commitb26cabb55ab3e74f6ebbfd6e5c36aca5fe6006b4Parent: e4b7f45- feat
- From<Option<String>>/From<Option<i64>> for Param (L8/L10 clearable columns)
1 changed file +12 -0
- src/db/page.rs +12 -0
src/db/page.rsmodified+12 -0
| @@ -115,6 +115,18 @@ impl From<Option<Uuid>> for Param { | |||
| 115 | } | 115 | } |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | +impl From<Option<String>> for Param { | ||
| 119 | + fn from(value: Option<String>) -> Self { | ||
| 120 | + Self::OptText(value) | ||
| 121 | + } | ||
| 122 | +} | ||
| 123 | + | ||
| 124 | +impl From<Option<i64>> for Param { | ||
| 125 | + fn from(value: Option<i64>) -> Self { | ||
| 126 | + Self::OptI64(value) | ||
| 127 | + } | ||
| 128 | +} | ||
| 129 | + | ||
| 118 | pub(crate) struct PagedList { | 130 | pub(crate) struct PagedList { |
| 119 | /// Everything after `FROM`, e.g. `note WHERE user_id = $1`. Placeholders | 131 | /// Everything after `FROM`, e.g. `note WHERE user_id = $1`. Placeholders |
| 120 | /// are positional in [`PagedList::bind`] order; shared verbatim by the | 132 | /// are positional in [`PagedList::bind`] order; shared verbatim by the |