百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
J

jsonOdm

> 数据库
开源

一个用于 JavaScript 的 JSON ODM (对象文档映射器),可在服务器或浏览器中使用。

100 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个用于 JavaScript 的 JSON ODM (对象文档映射器),可在服务器或浏览器中使用。

JSON ODM

by Konsultaner, Richard Burkhardt

This Project aims to be provide a json object document mapper.
Why would I need this?
There are many cases where you do not want to have the server query your data. You may also see this mapper as a fancy way to filter your data or prepare a view model. The original use case was an ionic app that was not interactive so providing a server backend was not needed, but structuring my data into joinable collections seemed very helpful.

And if you can use a server you may consider our new WebSocket server project "connectanum" for Publish/Subscribe and RPC communication

If you like the project please support it with a star here on GitHub

If commercial support is needed please contact me.

Docs

You can find the documentation here or compiled to the folder /docs/gen/*.

Road map

  • Implement query methods from mongo db
    • Comparison 100%
      • $eq
      • $gt
      • $gte
      • $lt
      • $lte
      • $ne
      • $in
      • $nin
    • Logical 100%
      • $or
      • $and
      • $not(= $nand as alias)
      • $nor
    • Element 100% (+ $isNull, for is null or undefined)
      • $exists
      • $type
    • Evaluation 100%
      • $mod
      • $regex
      • $text
      • $where
    • Geospatial 50% (maybe have a hard and a soft check -> performance)
      • $geoWithin
      • $geoIntersects
      • $near
      • $nearSphere
    • Array 0% i may not implement the first two
      • $all
      • $elementMatch
      • $size
    • Aggregation
      • Pipeline 30% ($limit and $skip is implemented as $result(skip,limit))
        • $project
        • $match
        • $redact
        • $limit
        • $skip
        • $unwind
        • $sort
        • $geoNear
        • $out
      • Grouping 70% ($count is used to count the results)
        • $group
        • $count
        • $sum
        • $avg
        • $first
        • $last
        • $min
        • $max
        • $push
        • $addToSet
      • Operators 20% ($mod is renamed $modulo, because Evaluation has a $mod)
        • Boolean
        • Set
        • Comparison
        • Arithmetic
        • String
        • Array
        • Date
        • Conditional
        • Variable
        • Grouping
  • Support Promise/A+ sources for the odm.addSource
  • Full CRUD support
  • Aggregation

Install from NPM-Package

bash
npm install json-odm

Build and run tests, both minified and unminified

Since PhantomJs has been archived, jsonOdm needed to switch to chrome headless for its test. To run tests have Chrome installed!

bash
npm install json-odm
cd npm_modules/json-odm/
npm install
gulp

Browser Support

Unit test ran successfully under Chrome,iOS7+,IE9+,Firefox,Android 4.4.2+
To be tested: Safari on OSX, IE8(test driver does not run in IE < 9 so it will be hard to test)

Example

This is only a basic example. Find a lot more in the docs, i.e. how to use $geoWithin

xml
…

Issues· 1 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptdatabasedocument-mapperjavascriptjson

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库