User Tools

Site Tools


Sidebar

box.space:select_error

Q. Why would this happen?

unix/:/tmp/Registry.sock> box.space.Resets:select(238420)[2]
—-
- null
...

unix/:/tmp/Registry.sock> box.space.Resets:select(238420)[1]
—-
- [238420, 2381, 4705, 300, 4705, 1478947339.2732, 'cb274e4c-d386-4785-8104-3644efcd751d']

unix/:/tmp/Registry.sock> box.space.Resets:select(238420)
—-
- - [238420, 2381, 4705, 300, 4705, 1478947339.2732, 'cb274e4c-d386-4785-8104-3644efcd751d']

Shouldn’t [2] return 2381? (2016)

A. It’s a peculiarity of selecting and the console output. select returns [[], …], and you're trying to access the second element of the array that does not exist.

To get the result you need, use select()[IDX][IDX_2] in the console.

Comments

Enter your comment. Wiki syntax is allowed:
O H G E K
 
box.space/select_error.txt · Last modified: 2018/06/04 16:47 by eabates

Real Time Web Analytics