module

PG

Constants

VERSION = "0.24.0"

Class methods

connect(url)

Establish a connection to the database

Source
connect_listen(url, channels : Enumerable(String), &blk : PQ::Notification -> ) : ListenConnection

ditto

Source
connect_listen(url, *channels : String, &blk : PQ::Notification -> ) : ListenConnection

Establish a special listen-only connection to the database.

PG.connect_listen(ENV["DATABASE_URL"], "foo", "bar") do |notification|
  pp notification.channel, notification.payload, notification.pid
end
Source

Macros

array_type(t, oid)
Source

Nested types