Module: Familia::Connection::Handler::ClassMethods

Defined in:
lib/familia/connection/handlers.rb

Overview

Class-level DSL injected into every handler class that includes Handler. Holds the capability flag readers and the supports declarator.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#allows_pipelined ⇒ Object (readonly)

Returns the value of attribute allows_pipelined.



80
81
82
# File 'lib/familia/connection/handlers.rb', line 80

def allows_pipelined
  @allows_pipelined
end

#allows_transaction ⇒ Object (readonly)

Returns the value of attribute allows_transaction.



80
81
82
# File 'lib/familia/connection/handlers.rb', line 80

def allows_transaction
  @allows_transaction
end

Instance Method Details

#supports(transaction: false, pipelined: false) ⇒ Object

Declare the operation modes this handler supports.

Parameters:

  • transaction (Boolean, Symbol) (defaults to: false) —

    true/false or :reentrant

  • pipelined (Boolean, Symbol) (defaults to: false) —

    true/false or :reentrant



86
87
88
89
# File 'lib/familia/connection/handlers.rb', line 86

def supports(transaction: false, pipelined: false)
  @allows_transaction = transaction
  @allows_pipelined = pipelined
end