Releases: vapor/postgres-nio
char(n) (BPCHAR) length fix
Fix Numeric String Serialization
add PostgresData+JSON support
Adds new methods and properties for using the JSON
data type. These methods mirror the existing methods for JSONB
.
User-defined Enum + Optional Fix
Bound optional values that are nil
should no longer result in an unexpected type warning (fixes #74)
PostgresData
will now return strings correctly for user-defined types like enums.
Remove BPCHAR to Swift Integer conversion
Removes support for converting PostgresData
containing BPCHAR
bytes (CHARACTER(n)
, CHAR
, etc) to Swift integers. Postgres CHAR(n)
fields may be padded with extra zero-bytes which makes conversion tricky. Since Postgres intends CHARACTER
fields to store string values, PostgresData
should only support conversion to Swift strings. To store 8-bits natively, use Postgres "char"
type (note the quotes).
PostgresNIO 1.0.0 Beta 2.3
Publicize useful PostgresRow
properties (#70)
PostgresNIO 1.0.0 Beta 2.2
- Added
PostgresConnection.addListener(channel:handler:)
(#60)
This method lets you add handlers for LISTEN
/ NOTIFY
messages.
// add notification listener to connection
conn.addListener(channel: "example") { context, notification in
print(notification) // notification payload
context.stop() // stop listening
}
// subscribe to notifications on this connection
_ = try conn.simpleQuery("LISTEN example").wait()
// send notification w/ empty payload
_ = try conn.simpleQuery("NOTIFY example").wait()
PostgresNIO 1.0.0 Beta 2.1
- Fixes
PostgresData(double:)
byte serialization (#65)