简体   繁体   English

轻松查询JSON数据

[英]JSON data querying by breeze

I attempting my first SPA. 我尝试了第一个SPA。

It will be a HTML representation of the model of our database structure to give to clients to look through the model and do queries of the database model (not the database data itself). 这将是我们数据库结构模型的HTML表示形式,以使客户端可以浏览模型并查询数据库模型(而不是数据库数据本身)。

The requirement is then for no updates and the SPA will be shipped with the release and thus will be offline. 然后要求没有更新,SPA将随发行版一起提供,因此将脱机。 Currently it is a static HTML page. 当前它是一个静态HTML页面。

My question is - is there a way to use breeze to query the json file I've created that describes the model? 我的问题是-有没有办法使用微风查询我创建的描述模型的json文件? All I've seen are examples of the EntityManager being initialised with a service URL - that will return the data. 我所看到的只是使用服务URL初始化EntityManager的示例-它将返回数据。

Not quite sure I understand the question. 不太确定我了解这个问题。 What do you mean by (no server)?. 您是什么意思(无服务器)? Does this mean that you want to bring all of the data down just once and then query it locally? 这是否意味着您只想一次删除所有数据,然后在本地查询?

If the data that you want to query is actually itself metadata then if you describe the structure of the metadata (ie metadata of metadata) in Breeze's native metadata format, then you should be able to query the metadata itself via Breeze's EntityQuery. 如果您要查询的数据实际上是元数据本身,那么如果您以Breeze的本机元数据格式描述元数据的结构(即元数据的元数据),那么您应该能够通过Breeze的EntityQuery查询元数据本身。

Probably a little more info would be helpful. 可能更多的信息会有所帮助。

Also, take a look at the Breeze NoDb sample for an example of "custom" metadata construction. 另外,请查看Breeze NoDb示例,以了解“自定义”元数据构造的示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM