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

Add between #111

Merged
merged 3 commits into from
Apr 20, 2019
Merged

Add between #111

merged 3 commits into from
Apr 20, 2019

Conversation

ibarrae
Copy link
Contributor

@ibarrae ibarrae commented Jan 3, 2019

Fixes #34

Please, let me know if there's anything else to be done/fixed regarding this issue 👍

Copy link
Collaborator

@parsonsmatt parsonsmatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks 😄

src/Database/Esqueleto/Internal/Language.hs Outdated Show resolved Hide resolved
Update release version to 2.8.0

Co-Authored-By: ibarrae <eibarra1992@hotmail.com>
@parsonsmatt parsonsmatt merged commit dfc20d5 into bitemyapp:master Apr 20, 2019
@parsonsmatt parsonsmatt mentioned this pull request Apr 20, 2019
@parsonsmatt
Copy link
Collaborator

Unfortunately this implementation doesn't work with non-val values. Here's a failing test case:

    it "works for a SqlExpr value" $ run $ do
        p1e  <- insert' p1
        _    <- insert' p2
        _    <- insert' p3
        ret <-
          select $
          from $ \p -> do
          where_ $
            just (p ^. PersonFavNum)
              `between`
                (p ^. PersonAge, p ^.  PersonWeight)
        liftIO $ ret `shouldBe` []

This fails with a format error. It should eventually succeed and then the [] return value should be filled in appropriately.

I can't figure out how to get this PR unmerged, so you will have to open a new PR :\

@ibarrae ibarrae mentioned this pull request Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add: BETWEEN
2 participants