User Tools

Site Tools


Sidebar

values:null

Q. How do I check if a value equals box.NULL and not nil? I’m asking since box.NULL == nil returns true. (2018)

A. You can use this simple function:

function is_null(value)
return value == nil and type(value) == 'cdata' end
---
...

tarantool> is_null(nil)
---
- false
...

tarantool> is_null(box.NULL)
---
- true
...

tarantool> is_null(100)
---
- false
...

Comments

Enter your comment. Wiki syntax is allowed:
U U U V N
 
values/null.txt · Last modified: 2018/05/25 20:05 by eabates

Real Time Web Analytics