Class: HBase::Request::RowRequest
- Inherits:
-
BasicRequest
- Object
- BasicRequest
- HBase::Request::RowRequest
- Defined in:
- lib/hbase/request/row_request.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Attributes inherited from BasicRequest
Instance Method Summary collapse
- #create ⇒ Object
- #delete(columns = nil) ⇒ Object
-
#initialize(table_name, name, timestamp = nil) ⇒ RowRequest
constructor
A new instance of RowRequest.
- #show(columns = nil, options = { }) ⇒ Object
Constructor Details
#initialize(table_name, name, timestamp = nil) ⇒ RowRequest
Returns a new instance of RowRequest.
8 9 10 11 12 13 |
# File 'lib/hbase/request/row_request.rb', line 8 def initialize(table_name, name, =nil) @table_name, @name, @timestamp = CGI.escape(table_name), CGI.escape(name), path = "/#{@table_name}/row/#{@name}" path << "/#{@timestamp}" if super(path) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/hbase/request/row_request.rb', line 5 def name @name end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
4 5 6 |
# File 'lib/hbase/request/row_request.rb', line 4 def table_name @table_name end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
6 7 8 |
# File 'lib/hbase/request/row_request.rb', line 6 def @timestamp end |
Instance Method Details
#create ⇒ Object
25 26 27 |
# File 'lib/hbase/request/row_request.rb', line 25 def create @path end |
#delete(columns = nil) ⇒ Object
29 30 31 32 |
# File 'lib/hbase/request/row_request.rb', line 29 def delete(columns = nil) @path << "?#{pack_params(columns)}" if columns @path end |
#show(columns = nil, options = { }) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/hbase/request/row_request.rb', line 15 def show(columns = nil, = { }) if columns @path << "?#{pack_params(columns)}" @path << "&version=#{[:version]}" if [:version] @path << "&offset=#{[:offset]}" if [:offset] @path << "&limit=#{[:limit]}" if [:limit] end @path end |