Keywords
Reserved Words
PQL reserves the words listed here for specific use. Reserved words allow both upper or lower case, but not mixed case.
| AND |
Use to add restrictions to the WHERE clause.
| |
| DELETE | Use to remove data from your database. | |
| FALSE | Use to indicate a false condition in a statement. | |
| FROM |
Use to indicate the tree node to start searching below. In
a query, the FROM clause defines the object that you want
information about. For example, SELECT * FROM /
requests all the information about the root and its sub-nodes.
| |
| HISTORY | Use to request history from leaf nodes. | |
| INSERT | Inputs values into a specific node without overwriting or deleting existing values. | |
| MERGE | Adds new data and makes intelligent decisions about which data to insert as new, which data to update as old, and which data to leave unchanged. | |
| NOT | Adds restrictions to the predicate by indicating what not to include in a search query. | |
| NULL | Use to indicate a null condition in a statement. | |
| OR | Adds restrictions to the predicate by indicating A or B, but not A and B. | |
| SELECT |
Indicates what data to display in the query results. The
clause in a query that defines the projection — which
is what you want to find out about the entity defined in the
FROM clause. For example, SELECT * FROM /
requests all the information about the root and its sub-nodes.
| |
| TRUE | Use to indicate a true condition in a statement. | |
| UPDATE | Adds the latest information to the database. | |
| WHERE |
Restricts or filters the search. The clause in a query
that defines any restrictions that further define the
SELECT clause. Restrictions make the query
more specific, and thus, more powerful. The clause in a
query that defines any restrictions that further define
the SELECT clause. Restrictions make the query
more specific, and thus, more powerful. For example,
SELECT * FROM /device WHERE device/name = 'Computer3'
requests all the information about the device named Computer 3.
|
Symbol Use
PQL uses the symbols listed here:
| * |
When used in the SELECT clause of a query,
the asterisk is similar to a wildcard that finds everything
about the object defined in the FROM clause.
In other words, the * asterisk generates the
tree representing the sub-tree below the anchor point (the
sub-tree specified by the FROM clause).
For example, SELECT * FROM / requests
all the information about the root and its sub-nodes.
| |
| , | When used in a query, commas indicate an ordinary comma. | |
| ( ) |
When used in a query, the curved brackets ( ) combines multiple
conditions to a single path or function.
For example, the following two lines...
WHERE interface/name = 'eth0' OR interface/oper_status = '1' ...can be written on a single line by applying the path to both conditions within the curved brackets: WHERE interface/(name = 'eth0' or oper_status = '1') | |
| -- |
When used in a query, double-dashes -- comment out a single line.
For example:WHERE interface/name='eth0' --This is a comment. | |
| " " | When used in a query, double quotes " " indicate a part of the sub-tree to perform a function on. Note: PQL does not recognize curly quotes — be careful cutting and pasting queries or statements from emails. | |
| // | When used in a query, double-slashes // comment out a single line. | |
| # | When used in a query, the pound sign # returns meta data, such as time-series, or history of versions. | |
| ' ' | When used in a query, single quotes ' ' indicate a string. Note: PQL does not recognize curly quotes — be careful cutting and pasting queries or statements from emails or other formatted files. | |
| / | When used in a query, a single slash / indicates an absolute path. A path without a starting slash is a non-absolute path. | |
| /* | When used in a query, a slash-asterisk /* comments out multiple lines. | |
| [ ] |
When used in a query, square brackets [ ] indicate a subtree
within another WHERE predicate clause.
|