mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Fix SQL syntax error
This commit is contained in:
parent
844a198753
commit
7ba0a5b5a4
1 changed files with 2 additions and 2 deletions
|
@ -5,6 +5,7 @@ use sqlx::{sqlite::SqlitePool, Executor};
|
||||||
use std::{
|
use std::{
|
||||||
convert::Infallible,
|
convert::Infallible,
|
||||||
fmt::{Debug, Display},
|
fmt::{Debug, Display},
|
||||||
|
str,
|
||||||
sync::Arc,
|
sync::Arc,
|
||||||
};
|
};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
@ -114,14 +115,13 @@ where
|
||||||
};
|
};
|
||||||
let upd_dialogue =
|
let upd_dialogue =
|
||||||
self.serializer.serialize(&dialogue).map_err(SqliteStorageError::SerdeError)?;
|
self.serializer.serialize(&dialogue).map_err(SqliteStorageError::SerdeError)?;
|
||||||
|
|
||||||
self.pool
|
self.pool
|
||||||
.acquire()
|
.acquire()
|
||||||
.await?
|
.await?
|
||||||
.execute(
|
.execute(
|
||||||
sqlx::query(
|
sqlx::query(
|
||||||
r#"
|
r#"
|
||||||
INSERT INTO teloxide_dialogues VALUES (?, ?) WHERE chat_id = ?
|
INSERT INTO teloxide_dialogues VALUES (?, ?)
|
||||||
ON CONFLICT(chat_id) DO UPDATE SET dialogue=excluded.dialogue
|
ON CONFLICT(chat_id) DO UPDATE SET dialogue=excluded.dialogue
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue