Skip to content

Commit

Permalink
style(NRQL): More code formatting, grammar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
austin-schaefer committed Mar 16, 2022
1 parent c9fd6cb commit 8494243
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Currently only simple arrays are supported, and can be queried with NRQL.

## Simple arrays [#simple-arrays]

Simple arrays are used to store a list of values of the same primitive type, e.g. numeric, boolean, or string. Examples of arrays include: [1, 2, 3, 4, 5], or [“US”, “CA”, “UK” ].
Simple arrays are used to store a list of values of the same primitive type, e.g. numeric, boolean, or string. An array looks like `[1, 2, 3, 4, 5]` or `[“US”, “CA”, “UK” ]`.

## Supported features [#supported-features]

Expand All @@ -19,13 +19,13 @@ Simple arrays are used to store a list of values of the same primitive type, e.g

## Unsupported features [#unsupported-features]

* Comparison operators are not supported with arrays, e.g. =, !=, IN, etc.
* Comparison operators such as `=`, `!=`, and `IN` are not supported with arrays.
* Arrays cannot be aggregated with aggregator functions such as `sum()` , `min()` , `max()` , etc.
* Arrays cannot contain other arrays
* Ex. `[“UK”, “US”, [“CA”, “OR”, “ATL”] ]` are not allowed.
* Arrays cannot contain `NULL`

## Array Functions [#array-functions]
## Array functions [#array-functions]

<CollapserGroup>
<Collapser
Expand All @@ -39,7 +39,7 @@ Simple arrays are used to store a list of values of the same primitive type, e.g
<CollapserGroup>
<Collapser title="Example: Get an element from an array">

Example: consider a simple array, [100, 110, 90, 100, 105], stored in a durations attribute.
Example: consider a simple array, `[100, 110, 90, 100, 105]`, stored in a durations attribute.

`getfield(durations, 2)` will return `90`.

Expand Down Expand Up @@ -85,8 +85,8 @@ Simple arrays are used to store a list of values of the same primitive type, e.g

<Collapser title={<>Use contains to filter items in <InlineCode>count(*)</InlineCode></>}>

Consider Transaction event type included an array, `guids`, as `[“9999-1234-9999”, “3333-7890-3333”, “5555-3456-555”]`.
To find the count of Transactions that include `“9999-1234-9999”` guid use:
Consider Transaction event type including an array, `guids`, as `[“9999-1234-9999”, “3333-7890-3333”, “5555-3456-555”]`.
To find the count of Transactions that include the `“9999-1234-9999”` GUID use:

`SELECT count(*) FROM Transaction WHERE contains(guids, “9999-1234-9999”)`

Expand Down

0 comments on commit 8494243

Please sign in to comment.