Skip to content

Releases: vapor/postgres-nio

Release Candidate 1

28 Feb 19:57
3bf4f6e

Choose a tag to compare

Release Candidate 1 Pre-release
Pre-release

Updates to Swift 5.2 and macOS 10.15. Replaces CMD5 module with SwiftCrypto.

Release candidates represent the final shift toward focusing on bug fixes and documentation. Breaking changes will only be accepted for critical issues. We expect a final release of this package shortly after Swift 5.2's release date.

Support Swift.Set

19 Feb 20:19
18fec1c

Choose a tag to compare

Support Swift.Set Pre-release
Pre-release

Adds support for converting Swift.Set to / from a native Postgres array.

Handle NAME Type in PropertyData.string Property

18 Feb 19:34
79da46b

Choose a tag to compare

Allows data that is contained as the .name type to be accessed through the PostgresData.string property.

var buffer = ByteBufferAllocator().buffer(capacity: 13)
buffer.writeString("password_hash")

let data = PostgresData(.name, value: buffer)
let string = data.string

// string == "password_hash"

char(n) (BPCHAR) length fix

12 Feb 21:31
0206f13

Choose a tag to compare

Pre-release

The char(n) (BPCHAR) data type now correctly supports values longer than one byte when converting to fixed-width integers or strings (fixes #71, fixes #79, #72).

Fix Numeric String Serialization

24 Jan 00:38
3f10b66

Choose a tag to compare

Pre-release

Fixes a bug causing NUMERIC string serialization to produce incorrect values when numbers have more than 4 zeroes before or after the decimal place. (#78, fixes #77)

add PostgresData+JSON support

22 Jan 21:53
5807407

Choose a tag to compare

Pre-release

Adds new methods and properties for using the JSON data type. These methods mirror the existing methods for JSONB.

User-defined Enum + Optional Fix

22 Jan 17:24
82c1ffa

Choose a tag to compare

Pre-release

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

26 Dec 17:18
3adaee5

Choose a tag to compare

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

13 Dec 22:00
c5010f3

Choose a tag to compare

Pre-release

Publicize useful PostgresRow properties (#70)

PostgresNIO 1.0.0 Beta 2.2

12 Dec 04:07
128eeb9

Choose a tag to compare

Pre-release
  • 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()
  • Adds PostgresData(array:elementType:) and PostgresData.array methods for untyped arrays (#67)

  • UInt8 can now decode from CHAR / BPCHAR (#41)

  • Added a ByteToMessageDecoderVerifier test (#68)