-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore: vendor hasql #5084
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
Open
wolfgangwalther
wants to merge
1,391
commits into
PostgREST:main
Choose a base branch
from
wolfgangwalther:vendor-hasql
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
chore: vendor hasql #5084
Changes from all commits
Commits
Show all changes
1391 commits
Select commit
Hold shift + click to select a range
5455fd7
Correct naming
nikita-volkov 14d78fb
Replace mapLeft with first
nikita-volkov e40be85
Add DerivingVia
nikita-volkov 01a5dd2
Update the changelog
nikita-volkov c3a83eb
Bundle extensions for libpq14
nikita-volkov 9b15127
Correct changelog
nikita-volkov 7d24e0d
Reduce the amount of changes to the error model for now
nikita-volkov 9150f4f
Add docs
nikita-volkov ed10244
Extend the docs
nikita-volkov 5b6dd9d
Merge pull request #160 from nikita-volkov/pipelining
nikita-volkov 864767b
Remove rerebase from the internal library deps
nikita-volkov 6c6c719
Update actions
nikita-volkov 4e027af
Merge branch 'master' into clean-up-public-deps
nikita-volkov dde6c39
Update the actions
nikita-volkov 1b16da3
Merge branch 'clean-up-public-deps'
nikita-volkov e8e5ee0
Move the generated image
nikita-volkov 3272c64
Set package version to 1.7
nikita-volkov 5c59813
Merge major into master
github-actions[bot] b2593b0
Update github actions
nikita-volkov 2fe9d80
Migrate to hasql 1.7
nikita-volkov 4339d1c
Update the extensions
nikita-volkov b5758a1
Format
nikita-volkov d408f00
Set package version to 1.2
nikita-volkov ba93c4f
Merge major into master
github-actions[bot] 088cb6f
Report errors when LISTEN or UNLISTEN fail
diogob 4901795
Extract executeOrPanic
diogob f1758f7
Now we have the proper error handling in case the LISTEN or UNLISTEN
diogob 122a92c
Merge pull request #25 from diogob/do-not-fail-silently
diogob 34b68be
Remove stack from repo since I am currently working only with cabal
diogob d1784b4
Merge pull request #26 from diogob/cabalonly
diogob b017d66
Bump minor version number
diogob 4ef3839
Upgrade hasql-pool to 1.2. Had to drop compatibility with previous ve…
diogob 48f92a8
Add some missing upper bounds
diogob 88c794e
Merge pull request #27 from diogob/hasql-pool-1.2
diogob 5f5a115
Bump minor version number
diogob f9746b0
Update README
nikita-volkov 384f22a
Update synopsis
nikita-volkov 023a047
Modernize and format
nikita-volkov 6939fa7
Format
nikita-volkov b6b52a9
Update the hasql dep
nikita-volkov e39b7de
Add tested-with
nikita-volkov 46e6c51
Format
nikita-volkov 66b32f7
Set package version to 1.1.1
nikita-volkov 2a9a710
Merge minor into master
github-actions[bot] 98c1890
Update the docs on libpq and etc
nikita-volkov db1c49e
Correct haddock
nikita-volkov 063f03a
Update the actions
nikita-volkov cb2ec1d
Clean up
nikita-volkov 91de395
Set package version to 1.7.0.1
nikita-volkov 954bb64
Merge patch into master
github-actions[bot] 8117dcb
Relax the bounds on all deps
nikita-volkov 0443b41
Format
nikita-volkov c9ec3cb
Update cabal
nikita-volkov d57b6a7
Clean up in prelude
nikita-volkov c6d99f8
Update the actions
nikita-volkov 4699456
Format
nikita-volkov bf2ff48
Add doc generation to CD
nikita-volkov b01f9c1
Modernize cabal
nikita-volkov ce7d629
Set package version to 0.1.1.3
nikita-volkov 0b8bcff
Merge patch into master
github-actions[bot] 38ad8ed
Format
nikita-volkov f2c3cd0
Set package version to 1.2.0.1
nikita-volkov 00a3302
Merge patch into master
github-actions[bot] 7d7456d
Fix the build and update the deps
nikita-volkov a476d7a
Set package version to 0.3.1.6
nikita-volkov b9fef25
Merge patch into master
github-actions[bot] 48121b6
Correct the docs
nikita-volkov 94aebd4
Set package version to 1.7.0.2
nikita-volkov b57e400
Merge patch into master
github-actions[bot] 6b63987
Remove contravariant-extras from regular dependencies
wolfgangwalther 9725220
Remove contravariant-extras from test dependencies
wolfgangwalther 07e02cd
Merge pull request #21 from wolfgangwalther/remove-contravariant-extras
nikita-volkov 7331c5d
Format
nikita-volkov 373fe02
Fix CI compatibility
nikita-volkov 1409207
Attempt to fix compatibility
nikita-volkov 6d55137
Set package version to 1.1.1.1
nikita-volkov 7910c09
Merge patch into master
github-actions[bot] 377aed7
Move to "iproute" from "network-ip" for the "inet" datatype
nikita-volkov 25dd8b3
Set package version to 1.8
nikita-volkov a2993a4
Merge major into master
github-actions[bot] 6d3f6b9
Provide support for hasql-1.8
nikita-volkov 2e4c5b5
Provide support for hasql-1.8
nikita-volkov 199dff3
Provide support for hasql-1.8
nikita-volkov 095ff80
Set package version to 1.1.1.2
nikita-volkov cf1cf4c
Merge patch into master
github-actions[bot] aa86089
Set package version to 1.2.0.2
nikita-volkov 36120b3
Merge patch into master
github-actions[bot] eb16719
Provide support for hasql-1.8
nikita-volkov f5db1a2
Set package version to 0.2
nikita-volkov 2d8edc9
Merge major into master
github-actions[bot] 84571fd
Set package version to 0.3.1.7
nikita-volkov cbd9146
Merge patch into master
github-actions[bot] 5537c6e
Make row and column number more explicit
JBetz 5a6c797
Merge pull request #164 from JBetz/improve-row-error-message
nikita-volkov d49834b
Allow newer libpq
nikita-volkov 3ae192c
Set package version to 1.8.0.1
nikita-volkov 862f407
Merge patch into master
github-actions[bot] f75598e
Make compatible with latest postgresql-libpq
nikita-volkov c894fb1
Set package version to 1.8.0.2
nikita-volkov f033b12
Merge patch into master
github-actions[bot] 52cfda4
Add connection reset on exceptions in non-idle transaction status
nikita-volkov 34c540d
Set package version to 1.8.1
nikita-volkov 43138e4
Merge minor into master
github-actions[bot] 3f8240c
Extend the changelog
nikita-volkov 8c3685e
Mask the exception handler
nikita-volkov 6bb52d0
Add the resetting of the registry in case of errors
nikita-volkov 914f8af
Set package version to 1.8.1.1
nikita-volkov a6215c0
Merge patch into master
github-actions[bot] a9ed279
Bump hasql, bytestring (#28)
TeofilC 51f123c
Bump patch version
diogob 5b44347
Update the docs
nikita-volkov e55415b
Format
nikita-volkov 541adf0
Set package version to 1.8.1.2
nikita-volkov 491e49e
Merge patch into master
github-actions[bot] a45aa3f
Make the release pipeline generate the docs
nikita-volkov eec974f
Explicitly state that the testing-kit sublib is private
nikita-volkov 9d583dc
Set package version to 1.8.1.3
nikita-volkov 70d4e51
Merge patch into master
github-actions[bot] 0b7c0c2
fix: Configufation -> Configuration
sekunho 97c36cb
Merge pull request #47 from sekunho/fix/configufation-type
nikita-volkov cb0c6bd
Set package version to 1.2.0.3
nikita-volkov cb04c4e
Merge patch into master
github-actions[bot] fef4664
Correct the docs
nikita-volkov 2142b2c
Set package version to 1.8.1.4
nikita-volkov b1f87c2
Merge patch into master
github-actions[bot] 038daf5
Lint
nikita-volkov 7b6a959
Add usePreparedStatements
nikita-volkov 41cf517
Rename the Settings module to ConnectionString
nikita-volkov dcc9e03
Rename definitions
nikita-volkov ded121c
Introduce a setting tree
nikita-volkov e482bec
Introduce Config as the compilation target
nikita-volkov 1c1131a
Reimplement settings as a tree
nikita-volkov 93d1453
Lint
nikita-volkov 69fe290
Add setters
nikita-volkov 9444102
Add construction from text
nikita-volkov 1da07c1
Update
nikita-volkov 4888be0
Add docs
nikita-volkov 498c13a
Update the changelog
nikita-volkov ae48158
Ditch the old ConnectionString module
nikita-volkov 82f3cca
Revise settings
nikita-volkov c6e8790
Update the CHANGELOG
nikita-volkov 7b61169
Polish the docs
nikita-volkov a86b57c
Update cabal.project
nikita-volkov 9d636e5
Lint
nikita-volkov 46f633a
Integrate with new hasql settings
nikita-volkov e85caa0
Allow hasql 1.9
nikita-volkov bc8d278
Allow hasql 1.9
nikita-volkov ec64bd3
Allow hasql 1.9
nikita-volkov 2713cee
Set package version to 1.9
nikita-volkov c2902a7
Merge major into master
github-actions[bot] 428e9d1
Update the deps
nikita-volkov d43e17b
Allow newer ghc-prim for the deps
nikita-volkov 3750870
Allow newer ghc-prim for the deps
nikita-volkov 69d6cee
Allow newer basic deps
nikita-volkov e9e54c9
Allow newer basic deps
nikita-volkov f621094
Set package version to 1.3
nikita-volkov 95ffd71
Merge major into master
github-actions[bot] f747782
Adapt the test suite
nikita-volkov 1d06a12
Set package version to 0.2.0.1
nikita-volkov 81faa49
Set package version to 0.3.1.8
nikita-volkov a37951c
Set package version to 1.1.1.3
nikita-volkov b183d4f
Merge patch into master
github-actions[bot] 15058e2
Remove unpreparedTransaction
nikita-volkov 0da21b2
Clean up
nikita-volkov f00a1a3
Set package version to 1.2
nikita-volkov 910bcd6
Merge major into master
github-actions[bot] 8a567e7
Correct the dep bounds on hasql
nikita-volkov cfadb84
Set package version to 1.2.0.1
nikita-volkov 557887f
Merge patch into master
github-actions[bot] 01a901e
Integrate with witherable
nikita-volkov e86187e
Set package version to 1.9.1
nikita-volkov 24bca5b
Merge minor into master
github-actions[bot] 710b8c2
Correct repo location
nikita-volkov c5acb41
threadWaitRead does not work on windows.
diogob b25bc04
Merge pull request #29 from diogob/threadWaitRead-does-not-work-windows
diogob b58a83f
Bump patch version
diogob 179910a
Allow tasty-quickcheck 0.11
wolfgangwalther 6d9039a
Merge pull request #169 from wolfgangwalther/patch-1
nikita-volkov 45d19e7
Set package version to 1.9.1.1
nikita-volkov f2e96b0
Merge patch into master
github-actions[bot] 1767836
Update CI
nikita-volkov 00bd089
Clean up
nikita-volkov ed5389c
Relax bounds
nikita-volkov d35b304
Adapt to the upcoming text-builder release
nikita-volkov e459da1
Update the deps
nikita-volkov 0be7ed4
Set package version to 1.9.1.2
nikita-volkov c74c582
Merge patch into master
github-actions[bot] ce9f201
Set package version to 1.3.0.1
nikita-volkov 4c864d8
Merge patch into master
github-actions[bot] 617193f
Remove the dependencies badge
nikita-volkov 0631892
Update the changelog
nikita-volkov 8d77fc0
Set package version to 1.3.0.2
nikita-volkov 3bad369
Merge patch into master
github-actions[bot] 0c28da3
Documentation updated to remove connectionString
feature-not-a-bug 81dfa60
Accidentally added dist-newstyle folder. Removed
feature-not-a-bug e367684
Merge pull request #172 from feature-not-a-bug/doc-update
nikita-volkov 55db61d
Correct the docs
nikita-volkov f141633
Set package version to 1.3.0.3
nikita-volkov 1097dbd
Add support for non-retryable transactions
laurenceisla de393d0
Merge pull request #23 from laurenceisla/no-retry-tx
nikita-volkov 93d7a3b
Set package version to 1.2.1
nikita-volkov ea6080c
Add macaddr encoder and decoder
kaol 011a3e1
Restrict postgresql-binary version to 0.14.1 or higher
nikita-volkov 2c3a334
Merge #173
nikita-volkov b49b09d
Set package version to 1.9.2
nikita-volkov 3ebd843
Merge minor into master
github-actions[bot] 962ae98
Add support for hasql 1.9
laurenceisla 66aee30
support range and multirange
bflyblue 1addb1b
remove accidentally committed flake.nix
bflyblue 89f1f27
add missing pipe character at beginning of comments
bflyblue 8c2cb1c
Merge pull request #174 from bflyblue/range-types
nikita-volkov 02ba0bc
Add missing exports
nikita-volkov 58acc38
Ditch typeable
nikita-volkov 0d2a135
Set package version to 1.9.3
nikita-volkov 6dffd20
Merge minor into master
github-actions[bot] 5f4c99f
Merge pull request #30 from laurenceisla/hasql-1.9
diogob aafad91
Update to version v4 since v2 would fail the pipeline
diogob 64e7437
Merge pull request #31 from diogob/update-ci-cache-action
diogob 77206be
Bump minor version number (update hasql dependency)
diogob 070290d
Handle the case when password is an empty string.
pranaysashank 6262cef
Always quote values and escape existing single quotes and backslash.
pranaysashank 34984d8
Reproduce (#176)
nikita-volkov f8fb948
Format
nikita-volkov f402ab0
Revert tests
nikita-volkov 06441da
Merge branch 'pr-177' into 176/reproduction
nikita-volkov bc530af
Update the tests to avoid quotes and slashes
nikita-volkov b9041c5
Update
nikita-volkov dbf97ff
Simplify to just passwords
nikita-volkov e83ae7b
Disable log forwarding
nikita-volkov 3aad81e
Reproduce
nikita-volkov d0a76ca
Merge branch '176/solution' into 176/reproduction
nikita-volkov 550681e
Merge branch '176/reproduction'
nikita-volkov d353314
Set package version to 1.9.3.1
nikita-volkov 9211a65
Move hasql to vendor/hasql
wolfgangwalther 3f75837
Move hasql-dynamic-statements to vendor/hasql-dynamic-statements
wolfgangwalther 4d3ce22
Move hasql-transaction to vendor/hasql-transaction
wolfgangwalther d2c93f4
Move hasql-implicits to vendor/hasql-implicits
wolfgangwalther 47b23d7
Move hasql-notifications to vendor/hasql-hasql-notifications
wolfgangwalther a937e83
Move hasql-pool to vendor/hasql-pool
wolfgangwalther 2d2e79b
Merge 'hasql/1.9.3.1' into main
wolfgangwalther dd643b3
Merge 'hasql-dynamic-statements/0.3.1.8' into main
wolfgangwalther 7f75122
Merge 'hasql-pool/1.3.0.3' into main
wolfgangwalther 814a8f1
Merge 'hasql-transaction/1.2.1' into main
wolfgangwalther 4b2690e
Merge 'hasql-implicits/0.2.0.1' into main
wolfgangwalther a191be4
Merge 'hasql-notifications/0.2.4.0' into main
wolfgangwalther 5628996
chore(hasql*): remove supporting files
wolfgangwalther 15ab636
chore(hasql*): merge vendored LICENSEs into main LICENSE file
wolfgangwalther 35b4712
chore(hasql*): use vendored source code
wolfgangwalther 9110378
chore(hasql*): run postgrest-style on vendored dependencies
wolfgangwalther 450759c
chore(hasql*): run postgrest-lint on vendored dependencies
wolfgangwalther File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| module Hasql.Commands | ||
| ( Commands, | ||
| asBytes, | ||
| setEncodersToUTF8, | ||
| setMinClientMessagesToWarning, | ||
| ) | ||
| where | ||
|
|
||
| import qualified Data.ByteString.Builder as BB | ||
| import qualified Data.ByteString.Lazy as BL | ||
| import Hasql.Prelude | ||
|
|
||
| newtype Commands | ||
| = Commands (DList BB.Builder) | ||
| deriving (Semigroup, Monoid) | ||
|
|
||
| asBytes :: Commands -> ByteString | ||
| asBytes (Commands list) = | ||
| BL.toStrict $ BB.toLazyByteString $ foldMap (<> BB.char7 ';') list | ||
|
|
||
| setEncodersToUTF8 :: Commands | ||
| setEncodersToUTF8 = | ||
| Commands (pure "SET client_encoding = 'UTF8'") | ||
|
|
||
| setMinClientMessagesToWarning :: Commands | ||
| setMinClientMessagesToWarning = | ||
| Commands (pure "SET client_min_messages TO WARNING") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| -- | | ||
| -- This module provides a low-level effectful API dealing with the connections to the database. | ||
| module Hasql.Connection | ||
| ( Connection, | ||
| ConnectionError, | ||
| acquire, | ||
| release, | ||
| withLibPQConnection, | ||
| ) | ||
| where | ||
|
|
||
| import Hasql.Connection.Core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| module Hasql.Connection.Config where | ||
|
|
||
| import Hasql.Prelude | ||
|
|
||
| data Config = Config | ||
| { connectionString :: ByteString, | ||
| usePreparedStatements :: Bool | ||
| } | ||
|
|
||
| class Updates a where | ||
| update :: a -> Config -> Config | ||
|
|
||
| nil :: Config | ||
| nil = | ||
| Config | ||
| { connectionString = "", | ||
| usePreparedStatements = True | ||
| } | ||
|
|
||
| fromUpdates :: (Updates a) => [a] -> Config | ||
| fromUpdates = foldl' (flip update) nil | ||
|
|
||
| setConnectionString :: ByteString -> Config -> Config | ||
| setConnectionString connectionString config = | ||
| config {connectionString} | ||
|
|
||
| setUsePreparedStatements :: Bool -> Config -> Config | ||
| setUsePreparedStatements usePreparedStatements config = | ||
| config {usePreparedStatements} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| module Hasql.Connection.Config.ConnectionString where | ||
|
|
||
| import qualified Data.ByteString as B | ||
| import qualified Data.ByteString.Char8 as BC | ||
| import qualified Data.Map.Strict as Map | ||
| import qualified Data.Text.Encoding | ||
| import qualified Hasql.Connection.Config.ConnectionString.Params as Params | ||
| import Hasql.Prelude | ||
|
|
||
| type ConnectionString = ByteString | ||
|
|
||
| class Constructs a where | ||
| construct :: a -> ConnectionString | ||
|
|
||
| fromText :: Text -> ConnectionString | ||
| fromText = Data.Text.Encoding.encodeUtf8 | ||
|
|
||
| fromParams :: Params.Params -> ConnectionString | ||
| fromParams = | ||
| B.intercalate " " . fmap renderParam . Map.toList | ||
| where | ||
| renderParam (k, v) = mconcat [k, "=", "'", escapeSingleQuote v, "'"] | ||
|
|
||
| escapeSingleQuote = | ||
| BC.concatMap | ||
| ( \w -> | ||
| case w of | ||
| '\'' -> BC.pack "\\'" | ||
| '\\' -> BC.pack "\\\\" | ||
| _ -> BC.singleton w | ||
| ) |
18 changes: 18 additions & 0 deletions
18
src/hasql/Hasql/Connection/Config/ConnectionString/Params.hs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| module Hasql.Connection.Config.ConnectionString.Params where | ||
|
|
||
| import qualified Data.Map.Strict as Map | ||
| import Hasql.Prelude | ||
|
|
||
| type Params = Map.Map ByteString ByteString | ||
|
|
||
| class Updates a where | ||
| update :: a -> Params -> Params | ||
|
|
||
| nil :: Params | ||
| nil = Map.empty | ||
|
|
||
| fromUpdates :: (Updates a) => [a] -> Params | ||
| fromUpdates = foldl' (flip update) nil | ||
|
|
||
| setKeyValue :: ByteString -> ByteString -> Params -> Params | ||
| setKeyValue = Map.insert |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.