mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
rename low-level db api
This commit is contained in:
parent
091b7da7b8
commit
aa076b370b
27 changed files with 70 additions and 70 deletions
|
|
@ -104,7 +104,7 @@ impl Browser {
|
|||
// Actions
|
||||
|
||||
pub fn clean(&self, transaction: &Transaction, app_id: &i64) -> Result<(), String> {
|
||||
match database::records(transaction, app_id) {
|
||||
match database::select(transaction, app_id) {
|
||||
Ok(records) => {
|
||||
for record in records {
|
||||
match database::delete(transaction, &record.id) {
|
||||
|
|
@ -127,7 +127,7 @@ impl Browser {
|
|||
}
|
||||
|
||||
pub fn restore(&self, transaction: &Transaction, app_id: &i64) -> Result<(), String> {
|
||||
match database::records(transaction, app_id) {
|
||||
match database::select(transaction, app_id) {
|
||||
Ok(records) => {
|
||||
for record in records {
|
||||
// Delegate restore action to childs
|
||||
|
|
@ -145,7 +145,7 @@ impl Browser {
|
|||
}
|
||||
|
||||
pub fn save(&self, transaction: &Transaction, app_id: &i64) -> Result<(), String> {
|
||||
match database::add(transaction, app_id) {
|
||||
match database::insert(transaction, app_id) {
|
||||
Ok(_) => {
|
||||
let id = database::last_insert_id(transaction);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue