Giter VIP home page Giter VIP logo

Comments (6)

zackyang000 avatar zackyang000 commented on July 27, 2024

没有这个问题, model 中的 year 不会与 $filter 中的函数 year 冲突.

如以下代码是可以正常工作的:

//第一个 year 是函数, 括号中的 year 是 model.
http://host/odata/resource?$filter=year(year) eq 2015

from node-odata.

airyland avatar airyland commented on July 27, 2024

这样写是没有错,但是下面这样写报错:
$filter=year eq 2015

from node-odata.

airyland avatar airyland commented on July 27, 2024
Error: gte() must be used after where() when called with these arguments
  at Query._ensurePath (/Users/lizheng/Seafile/DA/node_modules/node-odata/node_modules/mongoose/node_modules/mquery/lib/mquery.js:2373:11)
  at Query.(anonymous function) [as gte] (/Users/lizheng/Seafile/DA/node_modules/node-odata/node_modules/mongoose/node_modules/mquery/lib/mquery.js:511:12)
  at Object.module.exports.year (/Users/lizheng/Seafile/DA/node_modules/node-odata/lib/request/handle/get/query-functions/index.coffee:21:39)
  at module.exports (/Users/lizheng/Seafile/DA/node_modules/node-odata/lib/request/handle/get/query-parser/$filter.coffee:44:7)
  at Object.module.exports.getAll [as controller] (/Users/lizheng/Seafile/DA/node_modules/node-odata/lib/request/handle/get/index.coffee:16:5)
  at /Users/lizheng/Seafile/DA/node_modules/node-odata/lib/resource.coffee:58:21

from node-odata.

zackyang000 avatar zackyang000 commented on July 27, 2024

@airyland 确实是这样的, 感谢你的反馈, 我将尽快修复这个问题.

from node-odata.

zackyang000 avatar zackyang000 commented on July 27, 2024

@airyland 已修复这个问题, 请使用 npm update node-odata 更新到新版本.

from node-odata.

airyland avatar airyland commented on July 27, 2024

Thx

from node-odata.

Related Issues (20)

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.