Commit Graph

238 Commits

Author SHA1 Message Date
Nikita Volkov
75ffa3f13c Format 2022-09-25 15:28:34 +03:00
Nikita Volkov
fcadfbee3e Move to explicit references to data-types
In attempt to avoid Haddock redirecting to postgresql-binary for type signatures.
2022-09-17 11:53:13 +03:00
Nikita Volkov
ef5bb2f58a Fix the build 2022-09-08 14:13:37 +03:00
Nikita Volkov
3220655db9 Add lazy variations of bytestring json encoders
Addresses #149.
2022-09-07 21:53:39 +03:00
Nikita Volkov
55a4564abc Add handling of empty query response 2022-07-20 22:22:38 +03:00
Nikita Volkov
9276d7e298 Add error position 2022-07-07 10:47:11 +03:00
Nikita Volkov
cf6458fe76 Format 2022-07-07 10:42:48 +03:00
Nikita Volkov
0f8a24a682 Add a warning 2022-06-30 11:03:55 +03:00
Nikita Volkov
b64a7015a1 Format with ormolu 2022-06-20 13:55:04 +03:00
Nikita Volkov
7430eae90e Fix docs 2022-05-30 12:25:40 +03:00
Nikita Volkov
0d5fe2ea91 Correct docs 2022-02-10 12:44:58 +03:00
Nikita Volkov
128026e416 Add MonadReader 2022-01-02 19:27:38 +03:00
guaraqe
9d186f5e8c Add column index to RowError constructor 2021-12-12 21:02:25 +05:00
Nikita Volkov
7f1c0cfb9b Revert "Migrate to new text-builder"
This reverts commit d9bf8c8cea.
2021-11-02 10:26:35 +03:00
Viktor Dukhovni
0a1eef918c Deal with removed deprecated ByteString modules
The ByteString 0.11 package included with GHC 9.2 droppped a few
long deprecated modules and functions.
2021-11-01 16:12:33 -04:00
Nikita Volkov
d9bf8c8cea Migrate to new text-builder 2021-10-22 04:13:52 +03:00
Nikita Volkov
623a1ccf3b Correct a doc 2021-10-22 04:09:06 +03:00
Nikita Volkov
f3cc8542ca Fix the strictness of the foldl decoder (#140) 2021-09-17 10:56:29 +03:00
Nikita Volkov
8f51c36dfc Ditch a redundant dep 2021-03-24 16:38:39 +03:00
Nikita Volkov
39abdd9a02 Enforce Value decoder's result to have a representational role
Fixes #137
2021-03-24 10:25:05 +03:00
Nikita Volkov
35435c0e01 Update the deps 2021-03-23 15:06:42 +03:00
Nikita Volkov
33fc524e57 Add MonadFail for Composite 2020-06-13 13:33:02 +03:00
Nikita Volkov
64c3a0eed1 Refactor Row's MonadFail 2020-06-13 13:32:53 +03:00
Nikita Volkov
0fe7f0ccd7 Avoid crashing on absent code or message (#119) 2020-05-30 11:43:14 +03:00
Renzo Carbonara
2c9c2377e1 Add MonadFail instance for Row 2020-05-09 18:58:37 +03:00
Nikita Volkov
f578165491 Add refineResult 2020-03-21 20:54:13 +03:00
Jonathan Fischoff
63f225834e Add an Exception instance to QueryError #122 2020-02-17 09:25:18 -08:00
Nikita Volkov
0f6b788fb5 Sync with "master" 2020-01-22 09:21:36 +03:00
Nikita Volkov
482ed6a3f7 Correct the docs 2019-05-28 12:10:12 +03:00
Nikita Volkov
6e45f9f4d7 Add the IN and NOT IN recipe 2019-05-27 20:44:00 +03:00
Nikita Volkov
de0e34b62e Add notices about multidimensional arrays 2019-05-27 20:43:46 +03:00
Nikita Volkov
3fcbcb23ba Add a Contravariant instance for Array encoder 2019-05-26 18:05:59 +03:00
Nikita Volkov
d7d80ede8e Correct the docs 2019-05-26 18:00:26 +03:00
Nikita Volkov
5f51693e75 Correct the docs 2019-05-22 21:50:59 +03:00
Nikita Volkov
9ebf5593ce Correct the docs 2019-05-21 21:37:28 +03:00
Nikita Volkov
5c260f9b50 Correct the docs 2019-05-21 21:36:29 +03:00
Nikita Volkov
3b6af08a28 Add shortcut array decoders 2019-05-21 21:34:20 +03:00
Nikita Volkov
296de5498b Correct the grammar in docs 2019-05-21 21:34:01 +03:00
Nikita Volkov
37002e6530 Update the signature of "foldableArray" 2019-05-21 21:23:06 +03:00
Nikita Volkov
5fc68b7d92 Rearrange the encoders 2019-05-21 21:20:31 +03:00
Nikita Volkov
799fbca0ed Add "foldableArray" encoder 2019-05-21 21:18:22 +03:00
Nikita Volkov
38e80351e6 Correct the docs 2019-05-21 18:51:53 +03:00
Nikita Volkov
872808e963 Correct the docs 2019-05-21 14:56:53 +03:00
Nikita Volkov
a1ead0ed62 Ditch foldableDimension 2019-05-21 13:29:00 +03:00
Nikita Volkov
db4261ddb5 Rename unit to noResult 2019-05-21 13:25:22 +03:00
Nikita Volkov
8f78014876 Correct the docs 2019-05-21 13:22:07 +03:00
Nikita Volkov
5b258ae53a Ditch Primitive from encoders
That's for consistency with decoders, and decoders can't have this separation without introducing too much complexity. That's so because of there existing a support for composite types, which may consist of arrays and arrays may consist of composites.
2019-05-21 12:59:50 +03:00
Nikita Volkov
590be494bc Redesign decoders 2019-05-21 01:20:57 +03:00
Nikita Volkov
68339eeabe Ditch the coersion of encoders 2019-05-20 19:27:17 +03:00
Nikita Volkov
19345cf624 Redesign the encoders 2019-05-20 19:24:27 +03:00
Nikita Volkov
9eee8c990b Ditch the integration with "default" 2019-05-20 15:02:17 +03:00
Nikita Volkov
b3eba13de9
Merge pull request #110 from rl-king/update-encoders-example
Update Encoders introduction example
2019-04-23 11:48:16 +03:00
rl-king
c86d7a3b58 Update Encoders introduction example 2019-04-23 07:28:32 +02:00
rl-king
ad42b4e42a Rename value -> param 2019-04-14 16:50:22 +02:00
Ian Duncan
a5f75a788a Add convenience function for refining domain types 2019-01-17 10:57:54 +09:00
Nikita Volkov
f1d2015395 Fix the docs 2018-07-23 17:55:23 +03:00
Nikita Volkov
35c845eb32 Add explicit Semigroup 2018-06-06 17:23:18 +08:00
Nikita Volkov
9218bb5394 Reimplement Semigroup thru derivation 2018-06-05 16:19:50 +08:00
Nikita Volkov
e50dd830d5 Restore the correct docs 2018-05-25 19:36:02 +08:00
Nikita Volkov
509dafdfbf Rename Query to Statement 2018-05-23 18:33:34 +08:00
Nikita Volkov
1516b51593 Fix a typo in the docs 2018-05-23 18:33:01 +08:00
Nikita Volkov
726097efd5 Rename some result decoders 2018-05-23 18:11:16 +08:00
Nikita Volkov
8eb3830a7f Make the codec names more consistent 2018-05-23 18:09:16 +08:00
Nikita Volkov
ea4874ca7e Reimplement to add support for query param printing in failed queries 2018-05-23 17:58:24 +08:00
Nikita Volkov
b806c6ef1c Migrate from EitherT to ExceptT 2017-11-26 11:24:40 +03:00
Nikita Volkov
9ba0612f68 Extend the docs 2017-11-01 20:47:05 +03:00
steve-chavez
04cefc7b47 Update unknown decoder doc 2017-10-28 18:46:52 -05:00
steve-chavez
26fc28d922 Fix #80, better behavior for unknown encoder 2017-10-28 18:11:47 -05:00
AndrewRademacher
2f15f06f08 Reversed evaulation order when executing dropRemaining. 2017-09-22 16:04:15 -05:00
Nikita Volkov
a3c4521de7 Hide fromLeft and fromRight from "base-prelude" 2017-07-31 09:22:21 +03:00
Michael Karg
7a1156ac15 discard CPP and hide fromLeft/fromRight altogether 2017-07-30 22:49:21 +02:00
Michael Karg
f0a8b16f48 fixes nikita-volkov/hasql#76 2017-07-26 16:00:36 +02:00
Alex Mason
c819d6b5f3 Add documentation on how to perform an insert or multiple values. 2017-04-24 19:21:15 +10:00
Nikita Volkov
1a2e7ee3ec Update a builder dep 2017-03-21 00:29:27 +03:00
Nikita Volkov
7cba5bd1f0 Migrate to "postgresql-binary-0.12.1" 2017-03-21 00:27:52 +03:00
Nikita Volkov
2801829ff7 Fix the compatibility with the newer "base-prelude" 2017-03-16 15:16:41 +03:00
Rik van der Kleij
85e4c7a686 Support for inet data type. 2017-03-14 16:11:42 +01:00
Alexander Thiemann
47cbfe2731 Comment about "IN" queries.
As discussed in #61
2016-11-24 13:12:39 +01:00
Nikita Volkov
a802f907a4 Fix the docs 2016-09-20 06:08:50 +03:00
Nikita Volkov
af4583f403 Move all the private modules into the according namespace 2016-08-06 12:22:23 +03:00
Nikita Volkov
fe23060c75 Style corrections 2016-07-23 15:44:55 +03:00
Moritz Kiefer
5fb07162a8 Expose access to raw libpq connection
Needed for #43.
2016-07-23 12:20:50 +02:00
Nikita Volkov
00231954df Provide an instance of Decidable to the Params encoder 2016-04-25 17:26:25 +03:00
Nikita Volkov
b03ab41a77 Update PreparedStatementRegistry and fix the bug 2016-02-26 15:28:08 +03:00
Nikita Volkov
7954c8d734 Semigroup 2016-02-23 09:43:07 +03:00
Nikita Volkov
ff3dd818df Raw JSON support 2016-02-09 13:15:35 +03:00
Nikita Volkov
6135f5f980 JSONB 2016-01-29 11:46:18 +03:00
Nikita Volkov
85275809b9 "custom" decoder 2016-01-28 14:13:09 +03:00
Nikita Volkov
9f8fc65ff2 Fix some potential bugs 2016-01-24 19:52:53 +03:00
Nikita Volkov
24e31161c7 Fix the bug 2016-01-24 19:52:33 +03:00
Nikita Volkov
67576ac343 Fix the bug 2016-01-22 18:50:13 +03:00
Nikita Volkov
25a66b2443 A hotfix of the inverted integer-datetimes detection bug in encoders 2016-01-12 17:25:01 +03:00
Nikita Volkov
1871bde72d Add the "unknown" encoder 2016-01-12 10:55:36 +03:00
Nikita Volkov
90b7868678 Merge origin/master 2016-01-06 09:40:32 +03:00
Nikita Volkov
013506a690 Minor corrections 2015-12-28 12:14:42 +05:00
Leon P Smith
eeff72e2f6 Add rudimentary tracking of explicit disconnects
No guarantee that using a connection after it has been closed will
result in a sensible operation,  but at least it won't result in
a use-after-free memory fault now.

Also, this should make this interface relatively safe to use concurrently.
2015-12-26 01:32:03 -05:00
Nikita Volkov
d4757f3bbc MonadIO for Session 2015-12-23 20:35:21 +05:00
Nikita Volkov
15be208dd5 Move Settings to Connection 2015-12-23 17:07:14 +05:00
Nikita Volkov
032f3be9f5 Return ConnectionError 2015-12-23 16:23:39 +05:00
Nikita Volkov
b777ae2e40 Revision 2015-12-21 18:51:42 +05:00