Tags: FranzBusch/postgres-nio
Tags
Refactor PSQLRowStream to make async/await easier (vapor#201) ### Motivation `PSQLRowStream`'s current implementation is interesting. It should be better tested and easier to follow for async/await support later. ### Changes - Make `PSQLRowStream`'s implementation more sensible - Add unit tests for `PSQLRowStream` ### Result Adding async/await support becomes easier.
Add proper support for `Decimal` (vapor#194) * Use `PostgresNumeric` for `Decimal` instead of String * Make `Decimal` conform to `PSQLCodable` * Fix support for text decimals * Add integration test for decimal string serialization * Test inserting decimal to text column Co-authored-by: Gwynne Raskind <gwynne@darkrainfall.org>
ByteBuffer extension, prevent naming conflicts (vapor#204) ### Motivation Because of https://bugs.swift.org/browse/SR-15517, we might run into naming conflicts with SwiftNIO, once apple/swift-nio#1990 lands. ### Changes - Prefix all ByteBuffer utility methods ### Result Chances of breaking code reduced.
DataRow without allocation; DataRow as Collection; RowDescription top… … level (vapor#198) This is a cherry pick of vapor#188. ### Modifications - `DataRow` and `RowDescription` have been moved out of the `PSQLBackendMessage` namespace. This allows us to mark them as `@inlinable` or `@usableFromInline` at a later point, without marking everything in `PSQLBackendMessage` as `@inlinable` - `DataRow` does not use an internal array for its columns anymore. Instead all read operations are directly done on its ByteBuffer slice. - `DataRow` implements the `Collection` protocol now. ### Result One allocation fewer per queried row.
PreviousNext