Skip to main content

instanceOfBoolean (Function)

Checks whether the parameter is an instance of Boolean or not.

Syntax

<BOOL> instanceOfBoolean(<INT|LONG|DOUBLE|FLOAT|STRING|BOOL|OBJECT> arg)

Query Parameters

NameDescriptionDefault ValuePossible Data TypesOptionalDynamic
argThe parameter to be checked.INT LONG DOUBLE FLOAT STRING BOOL OBJECTNoYes

Example 1

    insert into barStream
select instanceOfBoolean(switchState) as state
from fooStream;

This returns true if the value of switchState is true.

Example 2

    insert into barStream
select instanceOfBoolean(value) as state
from fooStream;

if the value = 32 then this returns false as the value is not an instance of the boolean.