Skip to content

Commit

Permalink
persistent-2.10 support (#122)
Browse files Browse the repository at this point in the history
* persistent-2.10 support

* ignore cabal file

* 3.0.0

* update changelog [ci skip]
  • Loading branch information
parsonsmatt authored Apr 23, 2019
1 parent a0274e3 commit 7b7717b
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 174 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.cabal-sandbox/
cabal.sandbox.config
.hspec-failures
esqueleto.cabal
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ script:
- stack setup
- stack update
- stack build
- stack test -- esqueleto:postgresql
- stack test -- esqueleto:sqlite
- stack test -- esqueleto:mysql || exit 0 # TODO: Remove that exit 0 when mysql tests are checking correctly
- stack test
- cd test/expected-compile-failures/
- bash test.sh

Expand Down
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Unreleased
========

3.0.0
=======

- @parsonsmatt
- [#122](https://github.com/bitemyapp/esqueleto/pull/122): Support `persistent-2.10.0`. This is a breaking change due to the removal of deprecated exports from the `persistent` library.
- [#113](https://github.com/bitemyapp/esqueleto/pull/113): Remove the `esqueleto` type class. To migrate here, use `SqlExpr`, `SqlQuery`, and `SqlBackend` instead of using the polymorphic `Esqueleto sqlExpr sqlQuery sqlBackend => ...` types.

2.7.0
=======

Expand Down
161 changes: 0 additions & 161 deletions esqueleto.cabal

This file was deleted.

4 changes: 2 additions & 2 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: esqueleto
version: 2.7.0
version: 3.0.0
synopsis: Type-safe EDSL for SQL queries on persistent backends.
description: ! '@esqueleto@ is a bare bones, type-safe EDSL for SQL queries
that works with unmodified @persistent@ SQL backends. Its
Expand Down Expand Up @@ -51,7 +51,7 @@ dependencies:
- bytestring
- conduit >=1.3
- monad-logger
- persistent >=2.8.0 && <2.10
- persistent >=2.8.0 && <2.11
- resourcet >=1.2
- tagged >=0.2
- text >=0.11 && <1.3
Expand Down
2 changes: 0 additions & 2 deletions src/Database/Esqueleto/Internal/PersistentImport.hs
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,11 @@ module Database.Esqueleto.Internal.PersistentImport
RawSql(..),
CautiousMigration,
Column(..),
Connection,
ConnectionPool,
Migration,
PersistentSqlException(..),
Single(..),
Sql,
SqlPersist,
SqlPersistM,
SqlPersistT,
InsertSqlResult(..),
Expand Down
11 changes: 9 additions & 2 deletions stack-8.6.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# TODO: switch resolver to lts-13.x once that is released
resolver: nightly-2018-12-05
resolver: lts-13.6

packages:
- '.'

extra-deps:
- persistent-2.10.0
- persistent-template-2.7.0
- persistent-mysql-2.10.0
- persistent-postgresql-2.10.0
- postgresql-simple-0.6.1
- persistent-sqlite-2.10.0
2 changes: 1 addition & 1 deletion stack.yaml
6 changes: 3 additions & 3 deletions test/Common/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{-# OPTIONS_GHC -fno-warn-deprecations #-}
{-# LANGUAGE ConstraintKinds
, CPP
, UndecidableInstances
, EmptyDataDecls
, FlexibleContexts
, FlexibleInstances
Expand Down Expand Up @@ -88,7 +89,7 @@ share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistUpperCase|
age Int Maybe
weight Int Maybe
favNum Int
deriving Eq Show
deriving Eq Show Ord
BlogPost
title String
authorId PersonId
Expand Down Expand Up @@ -1123,8 +1124,7 @@ testListOfValues run = do
return (bp ^. BlogPostAuthorId)
where_ (p ^. PersonId `in_` subList_select subquery)
return p
liftIO $ ret `shouldBe` [ Entity p1k p1
, Entity p3k p3 ]
liftIO $ L.sort ret `shouldBe` L.sort [Entity p1k p1, Entity p3k p3]

it "NOT IN works for subList_select" $
run $ do
Expand Down

0 comments on commit 7b7717b

Please sign in to comment.