Skip to content
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

is operator type #36

Closed
john-kelly opened this issue Feb 27, 2017 · 5 comments
Closed

is operator type #36

john-kelly opened this issue Feb 27, 2017 · 5 comments

Comments

@john-kelly
Copy link
Owner

john-kelly commented Feb 27, 2017

{-| Is comparison
-}
is : Maybe Bool -> (schema -> Field (Maybe Bool)) -> schema -> Filter
is =
    singleValueFilterFn Is
@john-kelly
Copy link
Owner Author

@jbrgfx
Copy link

jbrgfx commented Feb 13, 2018

Can you provide an example of a filter comparison on a Boolean?

I understand the postgresql reference, but I am struggling to implement the same using elm-postgREST. I can, however, use curl to return what I expect via the binary postgrest haskell directly using eq.true.

The utility of the package is really impressive.

@jbrgfx
Copy link

jbrgfx commented Feb 13, 2018

I succeeded using:
. . . |> PG.is True ]
or
. . . |> PG.is False ]

The decoder does the work.
Sorry for the confusion.

@john-kelly
Copy link
Owner Author

Glad you figured it out! Might I recommend taking a look at the dev version (on the dev branch)

Depending on the state of your project, it might make sense to use the upcoming version. I'm working on the release. It's ready for alpha if you're interested

@jbrgfx
Copy link

jbrgfx commented Feb 13, 2018 via email

john-kelly added a commit that referenced this issue May 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants