Skip to content

Releases: vapor/postgres-nio

char(n) (BPCHAR) length fix

12 Feb 21:31
0206f13
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
Choose a tag to compare
Pre-release

Publicize useful PostgresRow properties (#70)

PostgresNIO 1.0.0 Beta 2.2

12 Dec 04:07
128eeb9
Compare
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)

PostgresNIO 1.0.0 Beta 2.1

11 Dec 00:19
37694b6
Compare
Choose a tag to compare
Pre-release
  • Fixes PostgresData(double:) byte serialization (#65)

PostgresNIO 1.0.0 Beta 2

09 Dec 19:00
4dbce11
Compare
Choose a tag to compare
Pre-release
  • Added support for custom Logger passing. (#58)

  • query(...) now sends bind types allowing for Postgres to cast binds automatically. (#63)

  • Renamed PostgresClient to PostgresDatabase (#58)

  • Fixed a leaking promise (#57)

  • Enabled test discovery on Linux (#64)

PostgresNIO 1.0.0 Alpha 1.6

18 Oct 19:39
1fc1c20
Compare
Choose a tag to compare
Pre-release
  • A warning will now be printed to the logger if supplied binds do not match what the query is expecting. (#54, #52)