NovaStar Core / Database Reference / Functions / Overview
The NovaStar database contains a number of functions that provide useful capabilities and can simplify SQL. Each function may have multiple signatures with different parameters to facilitate use in different situations.
- Functions for Data Reports
- Functions for Points
- Functions for Point Types
- Functions for Data Flag
- Functions for Data Interval
- Functions for System Applications
Functions for Data Reports
The following functions are useful to select data reports for applications, for example to perform data analysis and visualization. The functions are optimized to read only the data partition tables that are used in a requested period.
NovaStar Database Functions for Data Reports
Function | Description |
---|---|
data_analysis_interval_list |
Analyze data and get a list of analyses within an interval of a given time. |
data_analysis_interval_repeat |
Analyze data and get a list of analyses between a start and end time, at a frequency of a given interval. |
data_first_report |
Get the first data record for point(s) and period. |
data_last_report |
Get the last data record for point(s) and period. |
data_partition_newest |
Get the name of the newest data partition table. |
data_partition_oldest |
Get the name of the oldest data partition table. |
data_partition_table_name |
Get the appropriate data partition table name for a timestamp. |
data_select |
Select data records for point(s) and period. |
first_agg |
Appears to be unused - may be phased out in the future. |
last_agg |
Appears to be unused - may be phased out in the future. |
Functions for Points
The following functions process point configuration data.
NovaStar Database Functions for Points
Function | Description |
---|---|
numidfrompoint |
Get the point numid for a point given its database id. |
pointfromnumid |
Get point database id(s) for point(s) given point numid(s). |
pointfromremoteid |
Get point database id(s) for point(s) given point remote id(s). |
pointfromtagname |
Get point database id(s) for point(s) given point tag(s). |
remoteidfromnumid |
Currently appears to be unused, may be phased out in the future. |
remoteidfrompoint |
Currently appears to be unused, may be phased out in the future. |
Functions for Point Types
The following functions process point type configuration data.
NovaStar Database Functions for Point Types
Function | Description |
---|---|
point_flag_array |
Gets an array of point flag and point flag name objects given a point type ID. |
point_status_array |
Gets an array of a text representation of point status attributes given a point type ID. |
Functions for Data Flags
The following functions are useful for data flags,
for example to filter data records based on a data flag.
The V
flag indicates valid data, which is typically used to filter data reports for information products.
NovaStar Database Functions for Data Flags
Function | Description |
---|---|
data_isflag |
Check whether a given flag is in a list of flags. |
data_notflag |
Check whether a given flag is not in a list of flags. |
data_isalarmed |
Check whether A is in a list of flags. |
data_notalarmed |
Check whether A is not in a list of flags. |
data_isbreak |
Check whether B is in a list of flags. |
data_notbreak |
Check whether B is not in a list of flags. |
data_ismaintenance |
Check whether M is in a list of flags. |
data_notmaintenance |
Check whether M is not in a list of flags. |
data_isquestioned |
Check whether Q is in a list of flags. |
data_notquestioned |
Check whether Q is not in a list of flags. |
data_isvalid |
Check whether V is in a list of flags. |
data_notvalid |
Check whether V is not in a list of flags. |
data_isverified |
Check whether E is in a list of flags. |
data_notverified |
Check whether E is not in a list of flags. |
Functions for Data Interval
The following functions process data interval, for example to convert a data interval string to number of seconds.
NovaStar Database Functions for Data Interval
Function | Description |
---|---|
interval_as_text |
Get a textual representation of an interval. |
interval_from_seconds |
Get an interval object for an integer number of seconds. |
interval_from_text |
Get an interval object from a string with an integer and a time unit. |
interval_to_seconds |
Get the number of seconds in an interval. |
Functions for System Applications
The following functions are primarily used by programs that perform system tasks and should not be used by user applications. Some of these functions may be deleted in the future.
NovaStar Database Functions for System Applications
Function | Description |
---|---|
data_delete |
|
novastar_test |
|
nsdbdata |
|
nsdbdeletetabletriggers |
|
nsdbrole |
|
station_type_poll_command |
|
timestamp |
|
uninstall-5.0.2.15 |
|
uninstall-obsolete |
|
uninstall |
|
updatetablesequence |