mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
complete certificate export feature
This commit is contained in:
parent
8a62ef46df
commit
3dfcbc279d
9 changed files with 182 additions and 81 deletions
|
|
@ -45,6 +45,21 @@ impl Database {
|
|||
}
|
||||
}
|
||||
|
||||
/// Get single record match `id`
|
||||
pub fn record(&self, id: i64) -> Result<Option<Table>, Error> {
|
||||
let readable = self.connection.read().unwrap();
|
||||
let tx = readable.unchecked_transaction()?;
|
||||
let records = select(&tx, *self.profile_identity_id)?; // @TODO single record query
|
||||
|
||||
for record in records {
|
||||
if record.id == id {
|
||||
return Ok(Some(record));
|
||||
}
|
||||
}
|
||||
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
/// Get all records match current `profile_identity_id`
|
||||
pub fn records(&self) -> Result<Vec<Table>, Error> {
|
||||
let readable = self.connection.read().unwrap(); // @TODO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue