问题描述
我用两个索引创建了一个空间:
box.schema.sequence.create('user_seq',{ if_not_exists = true })
box.schema.create_space('users',{ if_not_exists = true,format={
{ name = 'id',type = 'unsigned'},{ name = 'name',type = 'string'},{ name = 'age',type = 'unsigned'}}
})
box.space.users:create_index('pk',{ parts = { 'id' },if_not_exists = true })
box.space.users:create_index('age',{ parts = { 'age' },if_not_exists = true })
已插入一些记录:
box.space.users:insert({ box.sequence.user_seq:next(),'Artur Barsegyan',24})
box.space.users:insert({ box.sequence.user_seq:next(),'Kostya Nazarov',32})
我应该如何选择数据?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)