class Granite::Connections

Defined in:

granite/connections.cr

Class Method Summary

Class Method Detail

def self.<<(data : NamedTuple(name: String, reader: String, writer: String, adapter_type: Granite::Adapter::Base.class)) : Nil #

[View source]
def self.<<(adapter : Granite::Adapter::Base) : Nil #

Registers the given adapter. Raises if an adapter with the same name has already been registered.


[View source]
def self.[](name : String) : NamedTuple(writer: Granite::Adapter::Base, reader: Granite::Adapter::Base) | Nil #

Returns a registered connection with the given name, otherwise nil.


[View source]
def self.connection_switch_wait_period : Int32 #

[View source]
def self.connection_switch_wait_period=(connection_switch_wait_period : Int32) #

[View source]
def self.first_connection #

[View source]
def self.first_reader : Granite::Adapter::Base #

[View source]
def self.first_writer : Granite::Adapter::Base #

[View source]
def self.registered_connections #

[View source]