dialtone_sqlx 0.1.0

Dialtone SQLx Back-End
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use sqlx::{Executor, Postgres};

pub async fn delete_site(
    exec: impl Executor<'_, Database = Postgres>,
    host_name: &str,
) -> Result<(), sqlx::Error> {
    sqlx::query(
        r#"
        delete from site_info where host_name = $1
        "#,
    )
    .bind(host_name)
    .execute(exec)
    .await?;
    Ok(())
}