javascript - Breeze.js and Tasypie : Handling non OData API -


i saw in lot different post breeze.js supposed work http served resource.

in breeze documentation, have references odata urls.

for example, following breeze code:

var query = breeze.entityquery()                   .from("customers")                   .where("companyname", "startswith", "c")                   .orderby("companyname"); 

will result in following odata request:

http://www.example.com/api/northwind/customers?$filter=startswith(companyname,'c') eq true&$orderby=companyname 

well that's nice, i'm using django+tastypie , not support odata parameters, request fail on backend.

how supposed change way breeze.js generate it's request api backend server? did missed in breeze doc? ithank help.

take @ edmunds sample. in sample, breeze client makes requests of service not speak odata.

if service doesn't support odata query syntax, can't use linq-like query expressions on breeze client. can't use "where" , "orderby". that's deal.

you can still compose query service endpoint accepts request. entityquery.from(anyurl) should work fine. can still leverage other benefits of breeze client-side data management - caching, validation, entity navigation, etc. you'll have construct metadata on client , handle query , save yourself.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -