Add smtp table

It replaces SendMsgToSmtp job.

Prepared outgoing SMTP payloads are stored in the database now rather
than files in blobdir.
This commit is contained in:
link2xt
2022-01-01 19:14:53 +00:00
parent 6316ee7c9b
commit afd8c0d879
13 changed files with 503 additions and 483 deletions

View File

@@ -271,10 +271,10 @@ impl Sql {
&self,
query: impl AsRef<str>,
params: impl rusqlite::Params,
) -> anyhow::Result<usize> {
) -> Result<i64> {
let conn = self.get_conn().await?;
conn.execute(query.as_ref(), params)?;
Ok(usize::try_from(conn.last_insert_rowid())?)
Ok(conn.last_insert_rowid())
}
/// Prepares and executes the statement and maps a function over the resulting rows.