Skip to content

v1.15 - Extended query protocol

Compare
Choose a tag to compare
@leafo leafo released this 03 Jun 19:01
· 6 commits to master since this release

https://luarocks.org/modules/leafo/pgmoon
https://opm.openresty.org/package/leafo/pgmoon/

Additions

Changes

  • The query method can now take additional arguments to cause the query to be sent using the extended query protocol with parameters from the arguments
  • Array deserialization is now aware of the NULL value and will return postgres.NULL instead of the string "NULL"
  • self.sock is no longer set to nil when calling disconnect or keepalive (you can reconnect again without allocating a new socket
  • Calling disconnect will now send a terminate message to the server before closing the socket, following the disconnection protocol
  • previously, on some errors, the socket would be disconnected. This is no longer the case, if message processing fails then the function returns the error result but the socket is left as is so you can continue to attempt operations on it
  • escape_literal() can now take pgmoon.NULL as a value and will return NULL
  • convert_nulls is now a config option specified in the constructor
  • Minor performance optimizations to batch together network operations where possible

Misc

  • Substantial updates to documentation: detailing new features, usage tips and examples, and other organizational updates
  • Add test suite runner for openresty using resty command