Skip to content

Commit

Permalink
Update the README to reflect generalized sorting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpromislow committed Jan 13, 2025
1 parent 45a9ba9 commit 996aced
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ The list can be negated to exclude results:

#### `sort`

Results can be sorted lexicographically by primary and secondary columns.
Results can be sorted lexicographically by any number of columns given in descending order of importance.

Sorting by only a primary column, for example name:
Sorting by only a single column, for example name:

```
/v1/{type}?sort=metadata.name
Expand All @@ -201,24 +201,24 @@ Reverse sorting by name:
/v1/{type}?sort=-metadata.name
```

The secondary sort criteria is comma separated.
Multiple sort criteria are comma separated.

Example, sorting by name and creation time in ascending order:
Example, sorting first by name and then by creation time in ascending order:

```
/v1/{type}?sort=metadata.name,metadata.creationTimestamp
```

Reverse sort by name, normal sort by creation time:
Reverse sort by name, then normal sort by creation time:

```
/v1/{type}?sort=-metadata.name,metadata.creationTimestamp
```

Normal sort by name, reverse sort by creation time:
Normal sort by namespace, then by name, reverse sort by creation time:

```
/v1/{type}?sort=metadata.name,-metadata.creationTimestamp
/v1/{type}?sort=metadata.namespace,metadata.name,-metadata.creationTimestamp
```

**If SQLite caching is enabled** (`server.Options.SQLCache=true`),
Expand Down

0 comments on commit 996aced

Please sign in to comment.