mirror of
https://github.com/Chaoscaot/schemsearch.git
synced 2025-11-04 21:54:00 +01:00
Fixes
This commit is contained in:
@ -25,7 +25,7 @@ impl SchematicFilter {
|
||||
pub fn build(self) -> String {
|
||||
let mut query = Vec::new();
|
||||
if let Some(user_id) = self.user_id {
|
||||
query.push(user_id.into_iter().map(|id| format!("ND.NodeOwner = {}", id)).collect::<Vec<String>>().join(" OR "));
|
||||
query.push(user_id.into_iter().map(|id| format!("SN.NodeOwner = {}", id)).collect::<Vec<String>>().join(" OR "));
|
||||
}
|
||||
if let Some(name) = self.name {
|
||||
query.push(name.into_iter().map(|name| format!("SN.NodeName LIKE '%{}%'", name)).collect::<Vec<String>>().join(" OR "));
|
||||
|
||||
@ -65,3 +65,7 @@ pub async fn load_schemdata(id: i32) -> Vec<u8> {
|
||||
rows.get(0)
|
||||
}
|
||||
|
||||
pub async fn close() {
|
||||
unsafe { CONN.lock().unwrap().take().unwrap().close().await }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user