-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list pipeline api endpoint should be more elaborate #75
Comments
Not implemented as in if you mean it looks commented like this: -- :name get-pipelines :query :many
SELECT p.name, p.image
FROM "pipelines" p
WHERE 1 = 1
--~ (when (not-empty (:pipeline params)) "AND p.name = :pipeline")
/*~ (when (not-empty (:status params)) "
AND EXISTS (SELECT r.status
FROM runs r
WHERE r.pipeline = p.name
AND :status = r.status
LIMIT 1)")
~*/ it is part of the HugSQL syntax |
maybe we can make the filtering explicit. with |
Right, it looked linke commented;)
…On 1 April 2020 21:27:35 CEST, "Rahuλ Dé" ***@***.***> wrote:
Not implemented as in if you mean it looks commented like this:
```sql
-- :name get-pipelines :query :many
SELECT p.name, p.image
FROM "pipelines" p
WHERE 1 = 1
--~ (when (not-empty (:pipeline params)) "AND p.name = :pipeline")
/*~ (when (not-empty (:status params)) "
AND EXISTS (SELECT r.status
FROM runs r
WHERE r.pipeline = p.name
AND :status = r.status
LIMIT 1)")
~*/
```
it is part of the HugSQL
[syntax](https://www.hugsql.org/#using-expressions)
Was that the question you had?
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#75 (comment)
|
Closing because it works now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am thinking about a solution for a more elaborate query of the pipeline endpoint. I think group and name could be left like it is but then I would prefer to have them work on their own, too. Like this
that would need a sql query that works based on a regex like this maybe:
The other option would be to offer entering the name of the pipeline as a whole. Offering name and group on their own but expecting both is confusing. Maybe like this:
And another thing: I don't get the status option. That should be worked out because it seems not to be implemented yet. Or completely taken out.
The text was updated successfully, but these errors were encountered: