packages feed

esqueleto 3.5.10.2 → 3.5.10.3

raw patch · 5 files changed

+18/−3 lines, 5 filesdep ~textPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: text

API changes (from Hackage documentation)

Files

changelog.md view
@@ -1,3 +1,9 @@+3.5.10.3+========+- @ttuegel+    - [#377](https://github.com/bitemyapp/esqueleto/pull/377)+        - Fix Postgres syntax for `noWait`+ 3.5.10.2 ======== - @parsonsmatt
esqueleto.cabal view
@@ -2,7 +2,7 @@  name:           esqueleto -version:        3.5.10.2+version:        3.5.10.3 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 language closely resembles SQL, so you don't have to learn new concepts, just new syntax, and it's fairly easy to predict the generated SQL and optimize it for your backend. Most kinds of errors committed when writing SQL are caught as compile-time errors---although it is possible to write type-checked @esqueleto@ queries that fail at runtime.                 .
src/Database/Esqueleto/Internal/Internal.hs view
@@ -3257,7 +3257,7 @@             makeLockingStrength PostgresForShare = plain "FOR SHARE"              makeLockingBehavior :: OnLockedBehavior -> (TLB.Builder, [PersistValue])-            makeLockingBehavior NoWait = plain "NO WAIT"+            makeLockingBehavior NoWait = plain "NOWAIT"             makeLockingBehavior SkipLocked = plain "SKIP LOCKED"             makeLockingBehavior Wait = plain "" 
src/Database/Esqueleto/PostgreSQL.hs view
@@ -441,7 +441,7 @@             , params             ) --- | `NO WAIT` syntax for postgres locking+-- | `NOWAIT` syntax for postgres locking -- error will be thrown if locked rows are attempted to be selected -- -- @since 3.5.9.0
test/PostgreSQL/Test.hs view
@@ -1423,6 +1423,15 @@                             asserting sideThreadAsserts                             asserting $ length nonLockedRowsAfterUpdate `shouldBe` 3 +    describe "noWait" $ do+        itDb "doesn't crash" $ do+            select $ do+                t <- Experimental.from $ table @Person+                EP.forUpdateOf t EP.noWait+                pure t++            asserting noExceptions+ -- Since lateral queries arent supported in Sqlite or older versions of mysql -- the test is in the Postgres module testLateralQuery :: SpecDb