module PG

Defined in:

pg.cr
pg/connection.cr
pg/decoder.cr
pg/decoders/array_decoder.cr
pg/error.cr
pg/escape_helper.cr
pg/geo.cr
pg/interval.cr
pg/numeric.cr
pg/version.cr
pg_ext/big_rational.cr

Constant Summary

VERSION = "0.24.0"

Class Method Summary

Macro Summary

Class Method Detail

def self.connect(url) #

Establish a connection to the database


[View source]
def self.connect_listen(url, channels : Enumerable(String), &blk : PQ::Notification -> ) : ListenConnection #

ditto


[View source]
def self.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

[View source]

Macro Detail

macro array_type(t, oid) #

[View source]