An identifier is a symbolic reference to a value in the current context of a query. Identifiers can include keyspace names, fields within documents, and aliases. N1QL identifiers are case sensitive.
An identifier can either be escaped or unescaped.
unescaped-identifier | escaped-identifier
If the current context is the document:
Then the identifier
name would evaluate to the value n1ql.
Unescaped identifiers cannot support the full range of identifiers allowed in a JSON document, but do support the most common ones with a simpler syntax.
[a-zA-Z_] ( [0-9a-zA-Z_$] )*
Escaped identifiers are surrounded by backticks and support all identifiers in JSON. You can use the backtick character within an escaped identifier by specifying two consecutive backtick characters. Keywords cannot be escaped; therefore, escaped identifiers can overlap with keywords.
` characters `
For example, if you have a hyphen in an attribute name, it can be referred to as