mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05: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
|
|
@ -16,11 +16,11 @@ pub fn init(tx: &Transaction) -> Result<usize, Error> {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn add(tx: &Transaction, app_id: &i64) -> Result<usize, Error> {
|
||||
pub fn insert(tx: &Transaction, app_id: &i64) -> Result<usize, Error> {
|
||||
tx.execute("INSERT INTO `app_browser` (`app_id`) VALUES (?)", [app_id])
|
||||
}
|
||||
|
||||
pub fn records(tx: &Transaction, app_id: &i64) -> Result<Vec<Table>, Error> {
|
||||
pub fn select(tx: &Transaction, app_id: &i64) -> Result<Vec<Table>, Error> {
|
||||
let mut stmt = tx.prepare("SELECT `id`, `app_id` FROM `app_browser` WHERE `app_id` = ?")?;
|
||||
|
||||
let result = stmt.query_map([app_id], |row| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue