Developers

Identifiers

PQL recognizes an identifier as any sequence of characters that start with a letter, and can include letters, underscores, and numbers. Identifiers are case-insensitive, with some exceptions. Identifiers must start with a letter, and cannot include spaces. You cannot use a reserved word as an identifier, unless you surround it with double quotes, as shown in the following examples.


Example 1: Misuse of reserved word

Query: Find the value of the Index node.

SELECT * 
FROM /network/device/wmi/win32_networkadaptersetting/element/index

Result: Paglo returns an error message because INDEX is a reserved word.

ERROR: Syntax error in line 1 at character 35, 
       didn't expect 'index' here

Example 2: Proper use of reserved word

Query: Find the value of the "Index" node.

SELECT * 
FROM /network/device/wmi/win32_networkadaptersetting/element/"index\"

Result: The use of double quotes around "index\" changes it from a reserved word into an identifier that produces a result.

row
   * 1
row
   * 2
row
   * 3 
   . . .

How do I find out more?