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_pipelinedObject (readonly)

Returns the value of attribute allows_pipelined.



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

def allows_pipelined
  @allows_pipelined
end

#allows_transactionObject (readonly)

Returns the value of attribute allows_transaction.



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

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



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

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