module Deltacloud::Helpers::Database

Constants

DATABASE_COLLECTIONS

Public Instance Methods

current_db() click to toggle source

This method allows to store things into database based on current driver and provider.

# File lib/cimi/helpers/database_helper.rb, line 39
def current_db
  Deltacloud::Database::Provider.lookup
end
current_provider() click to toggle source
# File lib/cimi/helpers/database_helper.rb, line 31
def current_provider
  Thread.current[:provider] || ENV['API_PROVIDER'] || 'default'
end
provides?(entity) click to toggle source
# File lib/cimi/helpers/database_helper.rb, line 27
def provides?(entity)
  DATABASE_COLLECTIONS.include? entity.to_s
end