mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
add todo comments
This commit is contained in:
parent
57a8b5091f
commit
c83248741b
1 changed files with 4 additions and 4 deletions
|
|
@ -29,7 +29,7 @@ impl Database {
|
||||||
|
|
||||||
/// Get bookmark records from database with optional filter by `request`
|
/// Get bookmark records from database with optional filter by `request`
|
||||||
pub fn records(&self, request: Option<&str>) -> Result<Vec<Table>, Error> {
|
pub fn records(&self, request: Option<&str>) -> Result<Vec<Table>, Error> {
|
||||||
let readable = self.connection.read().unwrap();
|
let readable = self.connection.read().unwrap(); // @TODO
|
||||||
let tx = readable.unchecked_transaction()?;
|
let tx = readable.unchecked_transaction()?;
|
||||||
select(&tx, *self.profile_id, request)
|
select(&tx, *self.profile_id, request)
|
||||||
}
|
}
|
||||||
|
|
@ -40,7 +40,7 @@ impl Database {
|
||||||
/// * return last insert ID on success
|
/// * return last insert ID on success
|
||||||
pub fn add(&self, time: DateTime, request: String) -> Result<i64, Error> {
|
pub fn add(&self, time: DateTime, request: String) -> Result<i64, Error> {
|
||||||
// Begin new transaction
|
// Begin new transaction
|
||||||
let mut writable = self.connection.write().unwrap();
|
let mut writable = self.connection.write().unwrap(); // @TODO
|
||||||
let tx = writable.transaction()?;
|
let tx = writable.transaction()?;
|
||||||
|
|
||||||
// Create new record
|
// Create new record
|
||||||
|
|
@ -59,8 +59,8 @@ impl Database {
|
||||||
/// Delete bookmark record from database
|
/// Delete bookmark record from database
|
||||||
pub fn delete(&self, id: i64) -> Result<(), Error> {
|
pub fn delete(&self, id: i64) -> Result<(), Error> {
|
||||||
// Begin new transaction
|
// Begin new transaction
|
||||||
let mut writable = self.connection.write().unwrap();
|
let mut writable = self.connection.write().unwrap(); // @TODO
|
||||||
let tx = writable.transaction().unwrap();
|
let tx = writable.transaction()?;
|
||||||
|
|
||||||
// Delete record by ID
|
// Delete record by ID
|
||||||
match delete(&tx, id) {
|
match delete(&tx, id) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue