mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
different format
This commit is contained in:
@@ -372,7 +372,7 @@ impl Sql {
|
|||||||
) -> Result<Vec<T>> {
|
) -> Result<Vec<T>> {
|
||||||
let conn = self.get_conn().await?;
|
let conn = self.get_conn().await?;
|
||||||
let rows: Result<Vec<T>> = tokio::task::block_in_place(move || {
|
let rows: Result<Vec<T>> = tokio::task::block_in_place(move || {
|
||||||
let mut stmt = conn.prepare(&format!("SELECT DISTINCT {column} FROM {table}"))?;
|
let mut stmt = conn.prepare(&format!("SELECT DISTINCT {} FROM {}", column, table))?;
|
||||||
let rows = stmt
|
let rows = stmt
|
||||||
.query([])?
|
.query([])?
|
||||||
.mapped(|r| r.get(0))
|
.mapped(|r| r.get(0))
|
||||||
|
|||||||
Reference in New Issue
Block a user