packages feed

pqi 1.0.0.3 → 1.1.0.2

raw patch · 4 files changed

Files

CHANGELOG.md view
@@ -1,3 +1,17 @@+# v1.1.0.2++Doc corrections: the README describes `Connection`, `Result` and `Cancel` as records instead of an `IsConnection` class.++# v1.1.0.1++Doc corrections.++# v1.1.0.0++## Breaking++- Renamed `Notify` fields to match `postgresql-libpq` exactly: `relname` → `notifyRelname`, `bePid` → `notifyBePid`, `extra` → `notifyExtra`+ # v1.0.0.3  Doc corrections.
README.md view
@@ -9,7 +9,7 @@  | Package | Description | |---------|-------------|-| **[pqi](https://github.com/nikita-volkov/pqi)** *(this)* | The interface: `IsConnection` class, shared types, and connection-independent helpers |+| **[pqi](https://github.com/nikita-volkov/pqi)** *(this)* | The interface: the `Adapter`, `Connection`, `Result` and `Cancel` records, shared types, and connection-independent helpers | | [pqi-ffi](https://github.com/nikita-volkov/pqi-ffi) | FFI adapter backed by `postgresql-libpq` and the C `libpq` library. Battle-tested, production-safe | | [pqi-native](https://github.com/nikita-volkov/pqi-native) | Pure-Haskell adapter speaking the PostgreSQL wire protocol directly. No C dependency. Alpha - interchangeable with `pqi-ffi` | | [pqi-conformance](https://github.com/nikita-volkov/pqi-conformance) | Reusable `hspec` conformance suite that differentially tests any adapter against `postgresql-libpq` |@@ -23,8 +23,8 @@ targets. There is no way to opt out.  `pqi` solves this by separating the interface from the implementation. It-defines a driver-agnostic type class (`IsConnection`) that mirrors the `libpq`-API surface, then ships two adapters:+defines a driver-agnostic `Connection` record (with `Result` and `Cancel`+alongside it) that mirrors the `libpq` API surface, then ships two adapters:  - [`pqi-ffi`](https://github.com/nikita-volkov/pqi-ffi) - a thin wrapper   around `postgresql-libpq`. Battle-tested, production-safe. The default@@ -53,7 +53,7 @@  ## Testing model -`pqi` comes accompanied by a comprehensive conformance suite isolated into an implementation-agnostic `pqi-conformance` package that covers various edge-cases and error conditions and covers most operations with a precondition that they must behave in exactly the same way that `postgresql-libpq` does.+`pqi` comes accompanied by a conformance suite isolated into an implementation-agnostic `pqi-conformance` package that covers various edge-cases and error conditions and covers most operations with a precondition that they must behave in exactly the same way that `postgresql-libpq` does.  ## Interface 
pqi.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: pqi-version: 1.0.0.3+version: 1.1.0.2 category: Database, PostgreSQL synopsis: Driver-agnostic interface to the PostgreSQL libpq API description:
src/library/Pqi.hs view
@@ -218,9 +218,9 @@  -- | An asynchronous notification, as returned by 'notifies'. data Notify = Notify-  { relname :: ByteString,-    bePid :: Int32,-    extra :: ByteString+  { notifyRelname :: ByteString,+    notifyBePid :: Int32,+    notifyExtra :: ByteString   }   deriving stock (Eq, Ord, Show) @@ -235,7 +235,7 @@   { -- | The status of the result.     resultStatus :: IO ExecStatus,     -- | The flat error message of the result, if any. Formatted locally by the-    -- driver, so adapters are not expected to agree byte for byte; use+    -- driver, so adapters are not expected to agree exactly; use     -- 'resultErrorField' where exactness matters.     resultErrorMessage :: IO (Maybe ByteString),     -- | A single structured field of the result's error report.@@ -339,7 +339,7 @@     -- | The server version, as an integer of the form @MMmmpp@.     serverVersion :: IO Int,     -- | The most recent error message, if any. Formatted locally by the driver,-    -- so adapters are not expected to agree byte for byte.+    -- so adapters are not expected to agree exactly.     errorMessage :: IO (Maybe ByteString),     -- | The file descriptor of the connection socket.     socket :: IO (Maybe Fd),