NovaStar Database Reference / Functions / data_isflag
Overview
The data_isflag function checks if a given flag (a single letter) is in a list of flags (a string). This is called by several additional functions that check each type of flag defined in NovaStar.
It is defined in the data_flags.sql file distributed with the NovaStar installer.
Function Usage
The data_isflag function syntax is as follows.
data_isflag(
IN flags text,
IN flag text)
The function returns a boolean - true if flag is in flags.
Function parameters are as follows.
data_select(...) Function Parameters
| Parameter | Description | Default |
|---|---|---|
flags |
String containing flags to check - typically the contents of the flags column of a data table. |
|
flag |
A single character, the NovaStar flag to check for. |
For the set of flags (or string) V1 and the single flag V, the following call would return true:
select * from data_isflag('V1','V');
Troubleshooting
See Also
data_notflag- Function that checks the opposite of this one.
Functions that call data_isflag internally:
data_isalarmed- Checks for the flagA.data_isbreak- Checks for the flagB.data_ismaintenance- Checks for the flagM.data_isquestioned- Checks for the flagQ.data_isvalid- Checks for the flagV.data_isverified- Checks for the flagE.