From 9ea1665de7adca15a859013e37e84aa19e16e0ba Mon Sep 17 00:00:00 2001 From: maheshrajamani <99678631+maheshrajamani@users.noreply.github.com> Date: Wed, 26 Apr 2023 13:27:10 -0400 Subject: [PATCH] updated spec for deleteOne and updateOne Fixed the spec for sort clause --- docs/jsonapi-spec.md | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/docs/jsonapi-spec.md b/docs/jsonapi-spec.md index 84eb71e4ec..2ac8550084 100644 --- a/docs/jsonapi-spec.md +++ b/docs/jsonapi-spec.md @@ -598,6 +598,15 @@ If an error occurs the command will still return `status` as some documents may ### deleteOne Command +*Syntax:* + +```bnf + ::= delete-one + + ::= ? + ? +``` + #### deleteOne Command Options The `deleteOne` command does not support any options. @@ -1001,6 +1010,17 @@ If an error occurs the command will still return `status` as some documents may ### updateOne Command +```bnf + ::= deleteOne + + ::= ? + ? + ? + ? + + ::= ? +``` + #### updateOne Command Options `` is a map of key-value pairs that modify the behavior of the command. All options are optional, with default behavior applied when not provided. @@ -1672,26 +1692,27 @@ of this include ordering a large result set that will returned as pages, or sorting a candidate set of documents to determine which document will be returned when only a single document is required. -**TODO** THis is wrong, it needs to be a map. - *Syntax:* ``` -`` ::= [`` *] +`` ::= `` * +`` ::= `` `` +`` ::= `` +`` ::= `` | `` +`` ::= `1` +`` ::= `-1` -`` ::= (-)?`` ``` -Each `` contains an ordered list of ``'s -which are used to sort a candidate set of documents. The order of +Each `` contains a json document ``'s +which are used to sort set of documents. The order of ``'s is important and should be preserved as the request is transmitted and processed. Each `` identifies a field in the document to sort by. -By default the field values are sorted in ascending order, if the field -name is prefixed with a `-` the field is sorted in descending order. A -maximum of **TODO** number of ``'s may be included in a -``. +`` is a [Document Path](#document-path) that identifies +the field to sort by. +`` can have value `1` for ascending and `-1` for descending order. *Sample:*