Tag: odata

jaydata odata-server newsreader示例抛出没有方法'basicAuth'exception

我没有得到odata-server在我的机器上工作(Windows 8.1,nodejs 0.10.30,mongo 2.4.8)。 也试过干净的Ubuntu安装,同样的问题。 Reproscheme: 创build目录 npm安装odata-server cd node_modules / odata-server 节点newsreader.js 这给出了以下输出: Should be empty: [] Test data upload successful. 100 items inserted. Starting NewsReader OData server. C:\Projects\odata\node_modules\odata-server\node_modules\mongodb\lib\mongodb\connection\base.js:245 throw message; ^ TypeError: Object function createServer() { function app(req, res, next){ app.handle(req, res, next); } merge(app, proto); merge(app, EventEmitter.prototype); app.route = '/'; app.stack = […]

如何在azure-mobile-apps-js-client中使用substringof

我想使用azure-mobile-apps-js-client的odata substringof方法。 目前我使用indexof方法,但想切换到substringof。 我有这个代码 function queryFunction(term){ return this.FullName.indexOf(term) != -1 } table.where(queryFunction, term) 转化为 $filter=indexof(FullName, term) ne -1 我需要这样的URL: filter=substringof(term, FullName) eq true 我如何做到这一点与JavaScript?

从Node.js中的Azure表存储返回原始实体

我的JavaScript对象/实体看起来像这样: { id: 1, name: 'foo', timestamp: new Date() } 我需要传递给Azure TableService的实体将如下所示: { id: { '_': 1, '$': 'Edm.Int32' }, name: { '_': 'foo', '$': 'Edm.String' }, timestamp:{ '_': new Date(), '$': 'Edm.DateTime' }, } 这很容易使用entityGenerator完成,这也是从TableService返回实体的格式。 从表中获取数据时是否可以返回TableService中的原始值? 我并不需要JavaScript对象上的所有这些ODatatypes和元数据 。 我可能需要使用像PropertyResolver的东西,但文档是相当混乱。

如何configuration一个Node JS服务器作为Breeze JS应用程序的端点

在这一点上,我确信由强大的数据查询服务支持的声明性绑定是为Web编写可扩展的富客户端应用程序的秘诀。 很明显,声明式数据绑定有很多选项(Knockout JS和Rivets for Backbone)。 但是,在查询服务器,caching数据和跟踪客户端的变化时,看起来只有一半的模块化解决scheme似乎是Breeze JS 。 然而,虽然它声称不指定服务器技术,但所有文档示例都显示了使用.NET运行的Breeze。 为了作为Breeze应用程序的端点,服务器必须满足什么要求(API相关或其他要求)? 是否足够实施OData协议? 有没有什么例子可以指明方向? 还是解决这个问题的其他图书馆,我已经错过了?

使用NodeJS和JayData的OData服务

我试图按照这个例子: http : //jaydata.org/blog/install-your-own-odata-server-with-nodejs-and-mongodb但它似乎是过时的,所以写在例子的评论我有更新一些代码行如下: 数据模型(data-model.js文件): $data.Class.define ( "dbTest.tblTest", $data.Entity, null, { ID: { type: "id", key: true, computed: true, nullable: false }, Data: { type: "string" } }, null ); $data.Class.defineEx ( "dbTest.Context", [ $data.EntityContext, $data.ServiceBase ], null, { tblTest: { type: $data.EntitySet, elementType: dbTest.tblTest } } ); exports = dbTest.Context; 服务器(server.js文件): var c = […]

我如何使用一个在node.js中调用xmlhttprequest的库?

我想使用data.js库从node.js运行OData接口的testing。 不幸的是,data.js打算在浏览器中使用,并使用XMLHttpRequest调用。 node.js不能处理这样的调用,因为我相信它们是在浏览器中实现的,而不是在JavaScript中实现的。 有没有一个模块,可以让我在node.js中使用data.js? XMLHttpRequest通常的解决scheme是可以的,当你可以在自己的代码中调用它们,但是在这里我不想改变data.js,所以这些选项是不能打开的。 这是一个错误的例子: var odata = require("./datajs-1.1.0.js"); try{ odata.OData.read( "http://services.odata.org/Northwind/Northwind.svc/Categories" ); } catch(err){ console.log ("Exception in index.js – " + err.name + ": " + err.message); } 运行node.js index.js : Exception in index.js – undefined: XMLHttpRequest not supported