mirror of
https://github.com/chaisql/chai.git
synced 2025-10-08 00:50:52 +08:00
40 lines
345 B
SQL
40 lines
345 B
SQL
-- test: typeof
|
|
! typeof()
|
|
|
|
! typeof(a)
|
|
'field not found'
|
|
|
|
> typeof(1)
|
|
'integer'
|
|
|
|
> typeof(1 + 1)
|
|
'integer'
|
|
|
|
> typeof(2.0)
|
|
'double'
|
|
|
|
> typeof(2.0)
|
|
'double'
|
|
|
|
> typeof(true)
|
|
'boolean'
|
|
|
|
> typeof('hello')
|
|
'text'
|
|
|
|
> typeof('\xAA')
|
|
'blob'
|
|
|
|
> typeof([])
|
|
'array'
|
|
|
|
> typeof({})
|
|
'document'
|
|
|
|
> typeof(NULL)
|
|
'null'
|
|
|
|
-- test: now
|
|
> typeof(now())
|
|
'timestamp'
|