mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-27 08:02:39 +00:00
Merge commit from fork
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
8af484292f
commit
812ff6ea5e
@@ -740,10 +740,10 @@ async fn list_apps(
|
||||
|
||||
if let Some(label) = &lq.label {
|
||||
for l in label.split(',') {
|
||||
// `binds` fills every `?` in one pass; chained `bind`s would re-scan a `?` in the bound value
|
||||
sqlb.and_where(
|
||||
"(app.labels @> ARRAY[?] OR folder_labels(app.workspace_id, app.path) @> ARRAY[?])"
|
||||
.bind(&l.trim())
|
||||
.bind(&l.trim()),
|
||||
.binds(&[&l.trim()]),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,8 +183,8 @@ fn items_query(
|
||||
let mut sqlb = SqlBuilder::select_from(&format!("{} as o", item_type));
|
||||
if scope_type == "favorites" {
|
||||
sqlb.join("favorite")
|
||||
.on("favorite.favorite_kind = ? AND favorite.workspace_id = o.workspace_id AND favorite.path = o.path AND favorite.usr = ?".bind(&item_type)
|
||||
.bind(&authed.username));
|
||||
.on("favorite.favorite_kind = ? AND favorite.workspace_id = o.workspace_id AND favorite.path = o.path AND favorite.usr = ?"
|
||||
.binds(&[&item_type, &authed.username]));
|
||||
}
|
||||
sqlb.and_where("o.workspace_id = ?".bind(&workspace_id))
|
||||
.and_where("o.archived = false");
|
||||
|
||||
@@ -98,10 +98,10 @@ async fn list_apps(
|
||||
|
||||
if let Some(label) = &lq.label {
|
||||
for l in label.split(',') {
|
||||
// `binds` fills every `?` in one pass; chained `bind`s would re-scan a `?` in the bound value
|
||||
sqlb.and_where(
|
||||
"(app.labels @> ARRAY[?] OR folder_labels(app.workspace_id, app.path) @> ARRAY[?])"
|
||||
.bind(&l.trim())
|
||||
.bind(&l.trim()),
|
||||
.binds(&[&l.trim()]),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user