Class: StrokeDB::PointQuery

Inherits:
Object show all
Defined in:
lib/strokedb/data_structures/point_query.rb

Overview

PointQuery is used to perform navigation to a single multidimensinal point. Initializer accepts a hash of slots. Slots may have such value types:

"string"           scalar string value
3.1415 (numeric)   numeric value
:L                 lowest value
:H                 highest value

Example:

PointQuery.new(:meta   => 'Article', 
               :author => 'Oleg Andreev', 
               :date   => :last)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(slots) ⇒ PointQuery

Returns a new instance of PointQuery.



17
18
19
20
21
22
# File 'lib/strokedb/data_structures/point_query.rb', line 17

def initialize(slots)
  @slots = {}
  slots.each do |k, v|
    @slots[k.to_optimized_raw] = v.to_optimized_raw
  end
end

Instance Attribute Details

#slotsObject (readonly)

Returns the value of attribute slots.



15
16
17
# File 'lib/strokedb/data_structures/point_query.rb', line 15

def slots
  @slots
end