User Tools

Site Tools


Sidebar

box.space:hset_alternative

Q. Is there a way to implement an HSET-like functionality (https://redis.io/commands/hset) in Tarantool? (2017)

A. You can use this snippet:

box.schema.create_space('xxx')
box.space.xxx:create_index('id', {parts = {1, 'string'}, type='HASH'})
box.space.xxx:put{'12346', 123456}
box.space.xxx:put{'12346', 146}
box.space.xxx:get{'12346'}

Comments

Enter your comment. Wiki syntax is allowed:
W P A M S
 
box.space/hset_alternative.txt · Last modified: 2018/05/25 22:56 by eabates

Real Time Web Analytics