Class: Tarantool::FiberDB::SpaceHash

Inherits:
SpaceHash
  • Object
show all
Includes:
CommonSpaceFiberMethods
Defined in:
lib/tarantool/fiber_db.rb

Constant Summary

Constants included from Request

Request::BINARY, Request::BOX_ADD, Request::BOX_REPLACE, Request::BOX_RETURN_TUPLE, Request::CALL_HEADER, Request::DELETE_HEADER, Request::EMPTY, Request::INSERT_HEADER, Request::INT32_0, Request::INT32_1, Request::LEST_INT32, Request::MAX_BYTE_SIZE, Request::ONE, Request::PACK_STRING, Request::REQUEST_CALL, Request::REQUEST_DELETE, Request::REQUEST_INSERT, Request::REQUEST_PING, Request::REQUEST_SELECT, Request::REQUEST_UPDATE, Request::SELECT_HEADER, Request::TYPES_AUTO, Request::TYPES_FALLBACK, Request::TYPES_STR_AUTO, Request::TYPES_STR_STR, Request::UPDATE_FIELDNO_OP, Request::UPDATE_HEADER, Request::UPDATE_OPS, Request::ZERO

Constants included from Serializers

Serializers::MAP

Constants included from Util::Packer

Util::Packer::INT16, Util::Packer::INT32, Util::Packer::INT64, Util::Packer::INT8, Util::Packer::MAX_INT16, Util::Packer::MAX_INT32, Util::Packer::MAX_INT64, Util::Packer::MAX_INT8, Util::Packer::MAX_SINT16, Util::Packer::MAX_SINT32, Util::Packer::MAX_SINT64, Util::Packer::MAX_SINT8, Util::Packer::MIN_INT, Util::Packer::MIN_SINT16, Util::Packer::MIN_SINT32, Util::Packer::MIN_SINT64, Util::Packer::MIN_SINT8, Util::Packer::SINT16, Util::Packer::SINT32, Util::Packer::SINT64, Util::Packer::SINT8

Instance Attribute Summary

Attributes included from Request

#insert_with_shards_count, #previous_shards_count, #shard_proc, #shards_count

Attributes included from CommonSpace

#space_no, #tarantool

Instance Method Summary collapse

Methods included from CommonSpaceFiberMethods

#all_by_pks, #call, #delete, #insert, #invoke, #ping, #replace, #store, #update

Methods inherited from SpaceHash

#_map_indexes, #_prepare_pk, #_prepare_tuple, #all_blk, #all_by_pks_cb, #all_cb, #by_pk_cb, #call_cb, #delete_cb, #first_blk, #first_cb, #initialize, #insert_cb, #invoke_cb, #replace_cb, #select_blk, #select_cb, #store_cb, #update_cb, #with_translator

Methods included from CommonSpaceBlockMethods

#all_by_pks_blk, #by_pk_blk, #call_blk, #delete_blk, #insert_blk, #invoke_blk, #ping_blk, #replace_blk, #store_blk, #update_blk

Methods included from Request

#_all_shards, #_call, #_delete, #_detect_shard, #_detect_shard_for_insert, #_detect_shards, #_detect_shards_for_insert, #_detect_shards_for_key, #_detect_shards_for_keys, #_detect_type, #_detect_types, #_flat_uniq, #_get_shard_nums, #_init_shard_vars, #_insert, #_modify_request, #_pack_operations, #_parse_hash_definition, #_ping, #_raise_integer_overflow, #_raise_or_return, #_select, #_send_request, #_space_call_fix_values, #_update, #all_shards, #detect_shard, #detect_shard_for_insert, #detect_shards, #detect_shards_for_insert, #pack_field, #pack_tuple, #shard

Methods included from Serializers

#check_type, #get_serializer

Constructor Details

This class inherits a constructor from Tarantool::SpaceHash

Instance Method Details

#all(keys, opts = {}) ⇒ Object



93
94
95
96
# File 'lib/tarantool/fiber_db.rb', line 93

def all(keys, opts = {})
  all_cb(keys, ::Fiber.current, opts)
  _raise_or_return ::Fiber.yield
end

#by_pk(key_array) ⇒ Object



88
89
90
91
# File 'lib/tarantool/fiber_db.rb', line 88

def by_pk(key_array)
  by_pk_cb(key_array, ::Fiber.current)
  _raise_or_return ::Fiber.yield
end

#first(key) ⇒ Object



98
99
100
101
# File 'lib/tarantool/fiber_db.rb', line 98

def first(key)
  first_cb(key, ::Fiber.current)
  _raise_or_return ::Fiber.yield
end

#select(keys, offset = 0, limit = -1)) ⇒ Object



103
104
105
106
# File 'lib/tarantool/fiber_db.rb', line 103

def select(keys, offset=0, limit=-1)
  select_cb(keys, offset, limit, ::Fiber.current)
  _raise_or_return ::Fiber.yield
end