Class: HBase::Request::TableRequest

Inherits:
BasicRequest show all
Defined in:
lib/hbase/request/table_request.rb

Instance Attribute Summary collapse

Attributes inherited from BasicRequest

#path

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ TableRequest

Returns a new instance of TableRequest.


7
8
9
10
# File 'lib/hbase/request/table_request.rb', line 7

def initialize(name)
  super("")
  @name = CGI.escape(name) if name
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body


5
6
7
# File 'lib/hbase/request/table_request.rb', line 5

def body
  @body
end

#nameObject (readonly)

Returns the value of attribute name


4
5
6
# File 'lib/hbase/request/table_request.rb', line 4

def name
  @name
end

Instance Method Details

#createObject


21
22
23
# File 'lib/hbase/request/table_request.rb', line 21

def create
  @path << "/"
end

#delete(columns = nil) ⇒ Object


37
38
39
40
41
# File 'lib/hbase/request/table_request.rb', line 37

def delete(columns = nil)
  @path << "/#{name}"
  @path << "?#{pack_params(columns)}" if columns
  @path
end

#disableObject


33
34
35
# File 'lib/hbase/request/table_request.rb', line 33

def disable
  @path << "/#{name}/disable"
end

#enableObject


29
30
31
# File 'lib/hbase/request/table_request.rb', line 29

def enable
  @path << "/#{name}/enable"
end

#regions(start_row = nil, end_row = nil) ⇒ Object


16
17
18
19
# File 'lib/hbase/request/table_request.rb', line 16

def regions(start_row = nil, end_row = nil)
  #TODO no handle the args!
  @path << "/#{name}/regions"
end

#showObject


12
13
14
# File 'lib/hbase/request/table_request.rb', line 12

def show
  @path << "/#{name}"
end

#updateObject


25
26
27
# File 'lib/hbase/request/table_request.rb', line 25

def update
  @path << "/#{name}"
end