module PG
Defined in:
pg.crpg/connection.cr
pg/decoder.cr
pg/decoders/array_decoder.cr
pg/error.cr
pg/escape_helper.cr
pg/geo.cr
pg/numeric.cr
pg/version.cr
pg_ext/big_rational.cr
Constant Summary
-
VERSION =
"0.21.1"
Class Method Summary
-
.connect(url)
Establish a connection to the database
-
.connect_listen(url, channels : Enumerable(String), &blk : PQ::Notification -> ) : ListenConnection
ditto
-
.connect_listen(url, *channels : String, &blk : PQ::Notification -> ) : ListenConnection
Establish a special listen-only connection to the database.
Macro Summary
Class Method Detail
def self.connect_listen(url, channels : Enumerable(String), &blk : PQ::Notification -> ) : ListenConnection
#
ditto
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