Distinct sub-query type
This commit is contained in:
@@ -71,10 +71,10 @@ pub async fn create_connection(db_config: &Database) -> Result<PgClient, Error>
|
||||
Ok(cl)
|
||||
}
|
||||
|
||||
pub async fn channel_exists(channel: &SfDbChannel, node_config: &NodeConfigCached) -> Result<bool, Error> {
|
||||
pub async fn channel_exists(channel_name: &str, node_config: &NodeConfigCached) -> Result<bool, Error> {
|
||||
let cl = create_connection(&node_config.node_config.cluster.database).await?;
|
||||
let rows = cl
|
||||
.query("select rowid from channels where name = $1::text", &[&channel.name()])
|
||||
.query("select rowid from channels where name = $1::text", &[&channel_name])
|
||||
.await
|
||||
.err_conv()?;
|
||||
debug!("channel_exists {} rows", rows.len());
|
||||
|
||||
Reference in New Issue
Block a user