Giter Club home page Giter Club logo

odata-client's People

Contributors

dependabot[bot] avatar ferjul17 avatar kanthoney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

odata-client's Issues

Need to send value as non-string

In OData, a date is used without quotes. E.g. ~/Customers?$filter=Birthday eq 2015-12-14 or ~/SomeFunction(referenceDate eq 2023-02-15).

The library doesn't support sending dates without quotes.
OData().fn('SomeFunction', {referenceDate: '2023-02-15'}) would result in ~/SomeFunction(referenceDate eq '2023-02-05').
Would it be possible to send those dates without quotes?

Incomplete use of $count

According to section 11.2.10 of the current OData v4.01 specification, the /$count path can be used to retrieve the number of items of a collection of entities or items of a collection-valued property.

However, according to section 11.2.6.5, it should also be possible to use $count=true as a system query option (i.e. query string parameter) in order to return the total count of items within a collection matching the request.

So, the following commit 4900381 should be revised in order to include both $count.

One way to circumvent the problem right now is to call custom() as follows in order to support the second use above:

q.custom({"$count":"true"})

=> will return @odata.count in the response

"Or" function trying to access 'filter' which is undefined

Line 71 of odata.js creates a new filter expression where the first argument is filter.
'filter' isn't defined in this scope, and I think the intent was for this argument to be 'field' instead.

Also, in the same function there's a period after 'field' rather than a comma on the line:
this._batch.or(field. op, value);

Unit tests don't run

Jest unit tests don't run when odata-client is used. The following error is thrown:

You need to run with a version of node that supports ES Modules in the VM API. See https://jestjs.io/docs/ecmascript-modules

      at invariant (node_modules/jest-runtime/build/index.js:2440:11)
      at Object.<anonymous> (node_modules/odata-client/request.js:9:15)
      at Object.<anonymous> (node_modules/odata-client/odata.js:9:17)

I am able to run the tests with NODE_OPTIONS=--experimental-vm-modules jest, but it would be nice if we didn't have to use a workaround

combining filters

I need to combine filters to filter the data. E.g.:

?$filter=(key1 eq 'abc' and key2 eq '123') or (key1 eq 'def' and key2 eq '456')

when I try to do this with

q.or('key1', '=', 'abc').and('key2', '=', '123')
 .or('key1', '=', 'def').and('key2', '=', '456')

that results in
(((key1 eq 'abc') and (key2 eq '123')) or (key1 eq 'def')) and (key2 eq '456'), so the parenthesis are not as I need them to be.
Is there a way I can influence the grouping of filters?

Need an example of getting data out

Can we get an example of what you would put inside the promise to get data instead of just a response object with some general meta-data but no real data?

Optional URIencodecomponent

I need a way to optionally not have Uri encoding. This is for people who do not want Uri encoding of odata.
Is it ok?

depends on vulnarable json-schema version. Please bump "request"

Hey,

please bump the dependency request to not have the transient dependency on vulnerable json-schema < 0.4.0.

Thank you!

json-schema <0.4.0
Severity: moderate
json-schema is vulnerable to Prototype Pollution - GHSA-896r-f27r-55mw
node_modules/json-schema
jsprim 0.3.0 - 2.0.1
Depends on vulnerable versions of json-schema
node_modules/jsprim
http-signature 1.0.0 - 1.3.5
Depends on vulnerable versions of jsprim
node_modules/http-signature
request >=2.66.0
Depends on vulnerable versions of http-signature
node_modules/request
odata-client *
Depends on vulnerable versions of request
node_modules/odata-client

can't filter by guid

when i try filter like Id eq guid'6e7a763b-0a7b-46a1-89d7-72cafa24cef2' i receive error
.filter("Id eq guid'6e7a763b-0a7b-46a1-89d7-72cafa24cef2'")
Please help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.