Skip to main content Link Menu Expand (external link) Document Search Copy Copied

PQL ALL() row call

The All() query is a PQL Row call that returns the universal set for the index, which comprises all record IDs / keys in an index.

Call Definition

All()

Returns

  • list of record IDs or record keys

Examples

Data:

Index: customer (non keyed)

 _id | age (Int) | has_purchased (Set) | last_purchase (Timestamp)
-----+-----------+---------------------+---------------------------
 0   |    23     | ["brand1","brand2"] | 2021-01-05T08:30:00Z
 1   |    31     | ["brand1","brand3"] | 2020-09-12T12:30:00Z
 2   |    28     | ["brand1","brand3"] | 2021-08-06T16:15:00Z
 3   |    19     | []                  | null
 4   |    25     | ["brand1","brand4"] | 2021-10-01T20:45:00Z
 5   |    40     | ["brand4"]          | 2022-01-13T11:00:00Z

Index: customer_keyed (keyed index)

 _id | age (Int) | has_purchased (Set) | last_purchase (Timestamp)
-----+-----------+---------------------+---------------------------
 a   |    23     | ["brand1","brand2"] | 2021-01-05T08:30:00Z
 b   |    31     | ["brand1","brand3"] | 2020-09-12T12:30:00Z
 c   |    28     | ["brand1","brand3"] | 2021-08-06T16:15:00Z
 d   |    19     | []                  | null
 e   |    25     | ["brand1","brand4"] | 2021-10-01T20:45:00Z
 f   |    40     | ["brand4"]          | 2022-01-13T11:00:00Z

Example 1

Return all the record IDs in the customer index

Query

[customer]All()

Tabular Response

 _id
-----
 0
 1
 2
 3
 4
 5

HTTP Response

{
  "results": [
    {
      "columns": [
        0,
        1,
        2,
        3,
        4,
        5
      ]
    }
  ]
}

Explanation:

0, 1, 2, 3, 4, and 5 are all the record IDs in the index


Example 2

Return all the record keys in the customer_keyed index

Query

[customer_keyed]All()

Tabular Response

 _id
-----
 a
 b
 c
 d
 e
 f

HTTP Response

{
  "results": [
    {
      "columns": [],
      "keys": [
        "a",
        "b",
        "c",
        "d",
        "e",
        "f"
      ]
    }
  ]
}

Explanation:

a, b, c, d, e, and f are all the record keys in the index