kanthoney / odata-client Goto Github PK
View Code? Open in Web Editor NEWodata client library for node
License: ISC License
odata client library for node
License: ISC License
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?
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
Can we have a sample query for batch POST?
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);
When doing a Odata({format: 'json').get(...)
, it would be nice if the result.body
would be a JSON object instead of a string that I have to manually parse to a JSON object.
Hey,
How would you pass authentication into http? Namely NTLM ?
tx,
gabor
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
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?
Is it besides querying a resource also possible to execute a OData function?
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?
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?
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
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.