class

ActionCable::SubscriptionAdapter::PostgreSQL

Inherits ActionCable::SubscriptionAdapter::Base < ActionCable::SubscriptionAdapter::PubsubAdapter < Reference < Object

Constructors

connect(url : String = ENV.fetch("DATABASE_URL", "postgres:///")) : PostgreSQL
Source
new(url : String = ENV.fetch("DATABASE_URL", "postgres:///"))
Source

Instance methods

broadcast(channel : String, payload : String) : Nil
Source
db
pg_channel(stream : String) : String

Deterministic stream-name → safe LISTEN identifier mapping (LISTEN identifiers may not contain arbitrary bytes).

Source
shutdown
Source
subscribe(channel : String, callback : Proc(String, Nil)) : Nil
Source
unsubscribe(channel : String, callback : Proc(String, Nil)) : Nil

Same Proc-identity deviation as Test/Async: drops every callback of the channel.

Source
url