Class: QAT::DB

Inherits:
Object
  • Object
show all
Includes:
Operations, Logger
Defined in:
lib/qat/db/version.rb,
lib/qat/db.rb,
lib/qat/db/loader.rb,
lib/qat/db/auto_load.rb

Overview

Namespace for database handling

Since:

  • 1.1.0

Defined Under Namespace

Modules: AutoLoad Classes: InvalidConfigurationError, Loader

Constant Summary collapse

VERSION =

QAT::DB Version

Since:

  • 1.1.0

'9.0.0'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Operations

#connect, #connection, #execute, #query

Constructor Details

#initialize(*args, &block) ⇒ DB

New QAT::DB



17
18
19
# File 'lib/qat/db.rb', line 17

def initialize(*args, &block)
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



14
15
16
# File 'lib/qat/db.rb', line 14

def args
  @args
end

Class Method Details

.method_missing(db) ⇒ Sequel::Database

Proxy to database connection stored in QAT::DB::Loader

Parameters:

  • db (String)

    database identifier

Returns:



25
26
27
# File 'lib/qat/db.rb', line 25

def method_missing(db)
  Loader.connections.fetch(db.to_sym)
end