mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
31 lines
745 B
Plaintext
31 lines
745 B
Plaintext
{
|
|
"name": "to_bool",
|
|
"type": "function",
|
|
"groups": ["Conversions"],
|
|
"description": "Converts a given value to a boolean. The function will return false if the value is NULL, an empty string, an empty list, or 0.",
|
|
"arguments": [{
|
|
"arg": "value",
|
|
"description": "value to convert to boolean"
|
|
}],
|
|
"examples": [{
|
|
"expression": "to_bool('')",
|
|
"returns": "false"
|
|
},{
|
|
"expression": "to_bool('123')",
|
|
"returns": "true"
|
|
},{
|
|
"expression": "to_bool('false')",
|
|
"returns": "true"
|
|
},{
|
|
"expression": "to_bool(0)",
|
|
"returns": "false"
|
|
},{
|
|
"expression": "to_bool(1)",
|
|
"returns": "true"
|
|
},{
|
|
"expression": "to_bool(null)",
|
|
"returns": "false"
|
|
}],
|
|
"tags": ["converts", "boolean"]
|
|
}
|