mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-09-12 06:51:50 +00:00
disable field not in use
This commit is contained in:
parent
bdd1292039
commit
00e916dc7c
@ -3,7 +3,7 @@ use std::sync::Arc;
|
|||||||
|
|
||||||
pub struct Table {
|
pub struct Table {
|
||||||
pub id: i64,
|
pub id: i64,
|
||||||
pub time: i64,
|
// pub time: i64,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct Database {
|
pub struct Database {
|
||||||
@ -30,14 +30,9 @@ impl Database {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn records(&self) -> Result<Vec<Table>, Error> {
|
pub fn records(&self) -> Result<Vec<Table>, Error> {
|
||||||
let mut statement = self.connection.prepare("SELECT `id`, `time` FROM `app`")?;
|
let mut statement = self.connection.prepare("SELECT `id` FROM `app`")?;
|
||||||
|
|
||||||
let result = statement.query_map([], |row| {
|
let result = statement.query_map([], |row| Ok(Table { id: row.get(0)? }))?;
|
||||||
Ok(Table {
|
|
||||||
id: row.get(0)?,
|
|
||||||
time: row.get(1)?,
|
|
||||||
})
|
|
||||||
})?;
|
|
||||||
|
|
||||||
let mut records = Vec::new();
|
let mut records = Vec::new();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user