Class: HmxClient::Command::Query

Inherits:
Base
  • Object
show all
Defined in:
lib/hmx/command/query.rb

Overview

Perform queries against data in hmx

Constant Summary

Constants inherited from Base

Base::FILE

Instance Attribute Summary

Attributes inherited from Base

#args, #options

Instance Method Summary collapse

Methods inherited from Base

#hmx, #initialize, #loadConfig!, namespace, #removeConfig, #storeConfig, #writeConfig

Methods included from Helpers

#display, #display_row, #display_tab, #display_table, #error, #getFromUser, #longest

Constructor Details

This class inherits a constructor from HmxClient::Command::Base

Instance Method Details

#indexObject

query

query for documents in a type

TYPENAME



15
16
17
18
19
20
# File 'lib/hmx/command/query.rb', line 15

def index
  unless args.size > 0
    raise CommandFailed, "Usage: hmx query <typeName> [<key>=<value>, [<key2>=<value2>...]]"
  end
  display hmx.doQuery([args.shift, nil])  
end