Sha256: c2455d60b280bb7836eeb59750dd5bf59db7650ea26f40866d9a798d7827d9f0

Contents?: true

Size: 1.18 KB

Versions: 1

Compression:

Stored size: 1.18 KB

Contents

module Kangaroo
  module Util
    
    # Proxy to the Db service (at /xmlrpc/db), specifically
    # to those functions, that don't need the superadmin password.
    # You can access this Proxy via your client instance:
    # @example
    #
    #     config = Kangaroo::Util::Configuration.new 'spec/test_env/test.yml'
    #     client = config.client
    #     db_proxy = client.db
    #     db_proxy.list
    #
    # For functions that need superadmin authentication (like create, drop etc)
    # @see Kangaroo::Util::Proxy::Superadmin
    class Proxy::Db < Proxy
      
      # Check if a database exists
      #
      # @param db_name Name of database to check
      # @return [boolean] true if database exists
      def db_exist db_name
        call! :db_exist, db_name
      end

      # Get a list of available databases
      #
      # @return list of databases
      def list
        call! :list
      end

      # Get a list of available languages
      #
      # @return list of languages
      def list_lang
        call! :list_lang
      end

      # Get running server version
      #
      # @return server version
      def server_version
        call! :server_version
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kangaroo-0.1.0.alpha1 lib/kangaroo/util/proxy/db.rb