Add asset status management
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -45,3 +45,19 @@ where
|
||||
.execute()
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn update_status_where_symbol<T>(
|
||||
clickhouse_client: &Client,
|
||||
symbol: &T,
|
||||
status: bool,
|
||||
) -> Result<(), Error>
|
||||
where
|
||||
T: AsRef<str> + Serialize + Send + Sync,
|
||||
{
|
||||
clickhouse_client
|
||||
.query("ALTER TABLE assets UPDATE status = ? WHERE symbol = ?")
|
||||
.bind(status)
|
||||
.bind(symbol)
|
||||
.execute()
|
||||
.await
|
||||
}
|
||||
|
Reference in New Issue
Block a user