Skip to content

Commit

Permalink
Clarify that OData operator for "not equals" is ne, not neq (#1019)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-white authored Oct 3, 2023
1 parent 4338fbb commit d5c8fa6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7745,7 +7745,7 @@ paths:
in: query
description: If provided, will filter responses to those matching the given
OData query. Only [certain fields](/central-api-odata-endpoints/#data-document)
are available to reference. The operators `lt`, `le`, `eq`, `neq`, `ge`,
are available to reference. The operators `lt`, `le`, `eq`, `ne`, `ge`,
`gt`, `not`, `and`, and `or` are supported, and the built-in functions `now`,
`year`, `month`, `day`, `hour`, `minute`, `second`.
schema:
Expand Down Expand Up @@ -7859,7 +7859,7 @@ paths:
in: query
description: If provided, will filter responses to those matching the given
OData query. Only [certain fields](/central-api-odata-endpoints/#data-document)
are available to reference. The operators `lt`, `le`, `eq`, `neq`, `ge`,
are available to reference. The operators `lt`, `le`, `eq`, `ne`, `ge`,
`gt`, `not`, `and`, and `or` are supported, and the built-in functions `now`,
`year`, `month`, `day`, `hour`, `minute`, `second`.
schema:
Expand Down Expand Up @@ -7970,7 +7970,7 @@ paths:
in: query
description: If provided, will filter responses to those matching the given
OData query. Only [certain fields](/central-api-odata-endpoints/#data-document)
are available to reference. The operators `lt`, `le`, `eq`, `neq`, `ge`,
are available to reference. The operators `lt`, `le`, `eq`, `ne`, `ge`,
`gt`, `not`, `and`, and `or` are supported, and the built-in functions `now`,
`year`, `month`, `day`, `hour`, `minute`, `second`.
schema:
Expand Down Expand Up @@ -8050,7 +8050,7 @@ paths:
in: query
description: If provided, will filter responses to those matching the given
OData query. Only [certain fields](/central-api-odata-endpoints/#data-document)
are available to reference. The operators `lt`, `le`, `eq`, `neq`, `ge`,
are available to reference. The operators `lt`, `le`, `eq`, `ne`, `ge`,
`gt`, `not`, `and`, and `or` are supported, and the built-in functions `now`,
`year`, `month`, `day`, `hour`, `minute`, `second`.
schema:
Expand Down Expand Up @@ -12189,7 +12189,7 @@ paths:
in: query
description: If provided, will filter responses to those matching the query.
Only [certain fields](/central-api-odata-endpoints/#data-document)
are available to reference. The operators `lt`, `le`, `eq`, `neq`, `ge`,
are available to reference. The operators `lt`, `le`, `eq`, `ne`, `ge`,
`gt`, `not`, `and`, and `or` are supported, and the built-in functions `now`,
`year`, `month`, `day`, `hour`, `minute`, `second`.
schema:
Expand Down Expand Up @@ -12658,7 +12658,7 @@ paths:
in: query
description: If provided, will filter responses to those matching the query.
Only [certain fields](/central-api-odata-endpoints/#data-document)
are available to reference. The operators `lt`, `le`, `eq`, `neq`, `ge`,
are available to reference. The operators `lt`, `le`, `eq`, `ne`, `ge`,
`gt`, `not`, `and`, and `or` are supported, and the built-in functions `now`,
`year`, `month`, `day`, `hour`, `minute`, `second`.
schema:
Expand Down Expand Up @@ -13107,7 +13107,7 @@ paths:
in: query
description: If provided, will filter responses to those matching the query.
Only [certain fields](/central-api-odata-endpoints/#data-document)
are available to reference. The operators `lt`, `le`, `eq`, `neq`, `ge`,
are available to reference. The operators `lt`, `le`, `eq`, `ne`, `ge`,
`gt`, `not`, `and`, and `or` are supported, and the built-in functions `now`,
`year`, `month`, `day`, `hour`, `minute`, `second`.
schema:
Expand Down
1 change: 1 addition & 0 deletions test/unit/data/odata-filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const odataFilter = (exp) => _odataFilter(exp, odataToColumnMap);
describe('OData filter query transformer', () => {
it('should transform binary expressions', () => {
odataFilter('3 eq 5').should.eql(sql`(${'3'} is not distinct from ${'5'})`);
odataFilter('3 ne 5').should.eql(sql`(${'3'} is distinct from ${'5'})`);
odataFilter('2 lt 3 and 5 gt 4').should.eql(sql`((${'2'} < ${'3'}) and (${'5'} > ${'4'}))`);
odataFilter('3 eq __system/submitterId').should.eql(sql`(${'3'} is not distinct from ${sql.identifier([ 'submissions', 'submitterId' ])})`);
odataFilter('2 eq $root/Submissions/__system/submitterId').should.eql(sql`(${'2'} is not distinct from ${sql.identifier([ 'submissions', 'submitterId' ])})`);
Expand Down

0 comments on commit d5c8fa6

Please sign in to comment.