headlines
Paglo Query Language in a Nutshell
The Paglo Query Language (PQL) is a powerful new programming language that was developed especially for requesting information from Paglo's dual-database Search Index. PQL is very similar to SQL, and is as human-readable. If you know SQL, PQL will be intuitive to you. You only need a few special characters and symbols to create a PQL query. Unlike SQL, however, PQL was developed especially for requesting information from Paglo's tree-structured database.
Structure
To make it easy to dissect and discuss parts of a query, examples in
Paglo documentation include capitalized reserved words, and a
multiple-line structure. But neither are required. PQL supports
queries using equivalent structures,
such as /FROM[WHERE](SELECT), and both formats shown here:
SELECT * FROM /network/device/interface WHERE mac_address = '01:01:02:03:04:05'
select * from /network/device/interface where mac_address = '01:01:02:03:04:05'
Paths
PQL recognizes a path as a location of a node in the tree-structured database. Paths list the root node first, if applicable, then additional nodes from the top down, and separate each node with a slash. See Paths for more details about how paths function in PQL. See Ontology for more details about how paths are structured in the Paglo database.
Data types
PQL recognizes the following expressions and data types:
Case-Insensitive
Paglo and PQL are not case-sensitive, with the following exception: Strings
are case-sensitive, and will not work if written with the wrong case. Use the
upper workaround if you are not sure which case a string should be,
such as:
WHERE upper (mac_address) = upper ('00:0a:0b:0c:0d')
Note: Reserved words are not case-sensitive and can be written in both upper
and lower case, but not mixed case. You must write the entire reserved word in the
same case. So Select or sELEct will fail, but both
SELECT and select will succeed.
Comments
PQL recognizes the following ways to insert comments in code:
-- |
Use double-dashes to comment out a single line. | |
// |
Use double-slashes to comment out a single line. | |
/* |
Use slash-star to comment out multiple lines, and end with
*/ notation.
|
Basic Statements
PQL supports the following basic action statements:

