mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
use &str
This commit is contained in:
parent
d1e928d163
commit
6f91efbc9c
2 changed files with 3 additions and 3 deletions
|
|
@ -39,7 +39,7 @@ impl Database {
|
|||
|
||||
/// Create new bookmark record in database
|
||||
/// * return last insert ID on success
|
||||
pub fn add(&self, time: DateTime, request: String) -> Result<i64> {
|
||||
pub fn add(&self, time: DateTime, request: &str) -> Result<i64> {
|
||||
let mut writable = self.connection.write().unwrap(); // @TODO
|
||||
let tx = writable.transaction()?;
|
||||
let id = insert(&tx, *self.profile_id, time, request)?;
|
||||
|
|
@ -74,7 +74,7 @@ pub fn init(tx: &Transaction) -> Result<usize> {
|
|||
)?)
|
||||
}
|
||||
|
||||
pub fn insert(tx: &Transaction, profile_id: i64, time: DateTime, request: String) -> Result<i64> {
|
||||
pub fn insert(tx: &Transaction, profile_id: i64, time: DateTime, request: &str) -> Result<i64> {
|
||||
tx.execute(
|
||||
"INSERT INTO `profile_bookmark` (
|
||||
`profile_id`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue