Class: Oinky::Index::Cursor
- Inherits:
-
Oinky::Internal::CursorBase
- Object
- Oinky::Internal::CursorBase
- Oinky::Index::Cursor
- Defined in:
- lib/oinky.rb
Instance Method Summary collapse
-
#initialize(host, where = nil) ⇒ Cursor
constructor
A new instance of Cursor.
- #seek(where) ⇒ Object
- #table ⇒ Object
Methods inherited from Oinky::Internal::CursorBase
#at_end?, #before_begin?, #clone, #column_selector_default, #each_backward, #each_forward, finalize, #is_valid?, #seek_first, #seek_last, #seek_next, #seek_prev, #select, #select_all, #select_all_values, #select_values, #state_val
Constructor Details
#initialize(host, where = nil) ⇒ Cursor
Returns a new instance of Cursor.
1101 1102 1103 1104 1105 1106 |
# File 'lib/oinky.rb', line 1101 def initialize(host, where = nil) super(host) if where seek(where) end end |
Instance Method Details
#seek(where) ⇒ Object
1108 1109 1110 1111 1112 |
# File 'lib/oinky.rb', line 1108 def seek(where) vars = Internal::Variant.make_from_set(where) Internal.wrap_oinky(Internal.oinky_index_cursor_seek_lower_bound(@hosthandle, @handle, vars.count, vars)) self end |
#table ⇒ Object
1097 1098 1099 |
# File 'lib/oinky.rb', line 1097 def table @host.table end |