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

Fix Postgres syntax for NOWAIT #377

Merged
merged 3 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Database/Esqueleto/Internal/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
import Data.Kind (Type)
import qualified Data.List as List
import qualified Data.Map.Strict as Map
import qualified Data.Monoid as Monoid

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.4.5)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.4.5)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.6.2)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.6.2)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.2.2)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.2.2)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 8.10.4)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 8.10.4)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.0.2)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.0.2)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 8.8.4)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 8.8.4)

The qualified import of ‘Data.Monoid’ is redundant

Check warning on line 63 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 8.6.5)

The qualified import of ‘Data.Monoid’ is redundant
import Data.Proxy (Proxy(..))
import Data.Set (Set)
import qualified Data.Set as Set
Expand All @@ -70,7 +70,7 @@
import Data.Typeable (Typeable)
import Database.Esqueleto.Internal.ExprParser (TableAccess(..), parseOnExpr)
import Database.Esqueleto.Internal.PersistentImport
import Database.Persist (EntityNameDB(..), FieldNameDB(..), SymbolToField(..))

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.4.5)

The import of ‘Database.Persist’ is redundant

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.4.5)

The import of ‘Database.Persist’ is redundant

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.6.2)

The import of ‘Database.Persist’ is redundant

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.6.2)

The import of ‘Database.Persist’ is redundant

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.2.2)

The import of ‘Database.Persist’ is redundant

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.2.2)

The import of ‘Database.Persist’ is redundant

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 8.10.4)

The import of ‘Database.Persist’ is redundant

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 8.10.4)

The import of ‘Database.Persist’ is redundant

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.0.2)

The import of ‘Database.Persist’ is redundant

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.0.2)

The import of ‘Database.Persist’ is redundant

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 8.8.4)

The import of ‘Database.Persist’ is redundant

Check warning on line 73 in src/Database/Esqueleto/Internal/Internal.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 8.8.4)

The import of ‘Database.Persist’ is redundant
import qualified Database.Persist
import Database.Persist.Sql.Util
( entityColumnCount
Expand Down Expand Up @@ -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 ""

Expand Down
2 changes: 1 addition & 1 deletion src/Database/Esqueleto/PostgreSQL.hs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
-- @since 3.1.3
insertSelectWithConflict
:: forall a m val backend
. (FinalResult a, KnowResult a ~ Unique val, MonadIO m, PersistEntity val, SqlBackendCanWrite backend)

Check warning on line 283 in src/Database/Esqueleto/PostgreSQL.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.4.5)

The use of ‘~’ without TypeOperators

Check warning on line 283 in src/Database/Esqueleto/PostgreSQL.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.4.5)

The use of ‘~’ without TypeOperators

Check warning on line 283 in src/Database/Esqueleto/PostgreSQL.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.6.2)

The use of ‘~’ without TypeOperators

Check warning on line 283 in src/Database/Esqueleto/PostgreSQL.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.6.2)

The use of ‘~’ without TypeOperators
=> a
-- ^ Unique constructor or a unique, this is used just to get the name of
-- the postgres constraint, the value(s) is(are) never used, so if you have
Expand All @@ -300,7 +300,7 @@
-- @since 3.1.3
insertSelectWithConflictCount
:: forall a val m backend
. (FinalResult a, KnowResult a ~ Unique val, MonadIO m, PersistEntity val,

Check warning on line 303 in src/Database/Esqueleto/PostgreSQL.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.4.5)

The use of ‘~’ without TypeOperators

Check warning on line 303 in src/Database/Esqueleto/PostgreSQL.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.4.5)

The use of ‘~’ without TypeOperators

Check warning on line 303 in src/Database/Esqueleto/PostgreSQL.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.6.2)

The use of ‘~’ without TypeOperators

Check warning on line 303 in src/Database/Esqueleto/PostgreSQL.hs

View workflow job for this annotation

GitHub Actions / build (3.8.1.0, 9.6.2)

The use of ‘~’ without TypeOperators
SqlBackendCanWrite backend)
=> a
-> SqlQuery (SqlExpr (Insertion val))
Expand Down Expand Up @@ -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
Expand Down
Loading