This commit is contained in:
Billy Chan 2022-12-20 15:56:42 +08:00
parent 5291c7f551
commit 1135c117c3
No known key found for this signature in database
GPG Key ID: A2D690CAC7DF3CC7

View File

@ -43,6 +43,11 @@ impl TryGetable for Events {
let vec: Vec<String> = res.try_get(pre, col).map_err(TryGetError::DbErr)?; let vec: Vec<String> = res.try_get(pre, col).map_err(TryGetError::DbErr)?;
Ok(Events(vec.into_iter().map(Event).collect())) Ok(Events(vec.into_iter().map(Event).collect()))
} }
fn try_get_by_index(res: &QueryResult, idx: usize) -> Result<Self, TryGetError> {
let vec: Vec<String> = res.try_get_by_index(idx).map_err(TryGetError::DbErr)?;
Ok(Events(vec.into_iter().map(Event).collect()))
}
} }
impl ValueType for Events { impl ValueType for Events {