A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/azure/cosmos-db/sql-query-is-bool below:

IS_BOOL - Azure Cosmos DB for NoSQL

APPLIES TO: NoSQL

Returns a boolean value indicating if the type of the specified expression is a boolean.

Syntax
IS_BOOL(<expr>)  
Arguments Description expr Any expression. Return types

Returns a boolean expression.

Examples

The following example checks objects of various types using the function.

SELECT VALUE {
    booleanIsBool: IS_BOOL(true),
    numberIsBool: IS_BOOL(65),  
    stringIsBool: IS_BOOL("AdventureWorks"),   
    nullIsBool: IS_BOOL(null),  
    objectIsBool: IS_BOOL({size: "small"}),   
    arrayIsBool: IS_BOOL([25344, 82947]),  
    arrayObjectPropertyIsBool: IS_BOOL({skus: [25344, 82947], vendors: null}.skus),
    invalidObjectPropertyIsBool: IS_BOOL({skus: [25344, 82947], vendors: null}.size),
    nullObjectPropertyIsBool: IS_BOOL({skus: [25344, 82947], vendors: null}.vendor)
}
[
  {
    "booleanIsBool": true,
    "numberIsBool": false,
    "stringIsBool": false,
    "nullIsBool": false,
    "objectIsBool": false,
    "arrayIsBool": false,
    "arrayObjectPropertyIsBool": false,
    "invalidObjectPropertyIsBool": false,
    "nullObjectPropertyIsBool": false
  }
]

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4