eggjs orm plugin specification

Created on 15 Feb 2017  ·  22Comments  ·  Source: eggjs/egg

Now there are more and more orm framework requirements, most orm framework are Active-record-pattern-like(https://en.wikipedia.org/wiki/Active_record_pattern), similar to the view plugin(https://eggjs.org/zh-cn/advanced/view-plugin.html), we need a specification for egg orm plugin.

Orm framework generally has the following features:

  • transform table to object, and use files under app/models to define.
  • Relationship between several tables.
  • Syntactic sugar for query, update, delete etc.
    ...

So let us discuss whether a specification is needed or not?

discussion

Most helpful comment

I have developed an ORM, Modelar, I recommend have a look at it, may satisfy egg needs, support MySQL/MariaDB, PostgreSQL, SQLite, MsSQL, OracleDB and DB2, similar to TypeORM, but written in pure JavaScript.
https://github.com/hyurl/modelar
Give me notice if you'd like it or have any suggests.

A demo has been published at cnode.org, please visit:
https://cnodejs.org/topic/5a27b1add92f2f5b185acc68

All 22 comments

currently, we got:

@popomore should we need proposal label?

@atian25 maybe RFC

Now we see some points in specification:

  • Directory for defining data models like app/model or app/models
  • File name specification for data model
  • How to access data model, by ctx/app
  • plugin pattern

    • config

    • heartbeat request

    • tracelog

    • event handle like onerror, ondisconnect, onconnect

only use app/model, not s

https://github.com/balderdashy/waterline
Waterline is a next-generation storage and retrieval engine, and the default ORM used in the Sails framework
It provides a uniform API for accessing stuff from different kinds of databases, protocols, and 3rd party APIs. That means you write the same code to get and store things like users, whether they live in Redis, MySQL, MongoDB, or Postgres.

@atian25 @popomore
how is going about this topic?
we need an offical orm.
is there a roadmap or timeline for this?

I have developed an ORM, Modelar, I recommend have a look at it, may satisfy egg needs, support MySQL/MariaDB, PostgreSQL, SQLite, MsSQL, OracleDB and DB2, similar to TypeORM, but written in pure JavaScript.
https://github.com/hyurl/modelar
Give me notice if you'd like it or have any suggests.

A demo has been published at cnode.org, please visit:
https://cnodejs.org/topic/5a27b1add92f2f5b185acc68

目前有什么进展吗?

我也想问下egg的orm...怎么样了

我也想问下egg的orm...怎么样了+1

设计了三年还没设计出来,这个项目算是死了,大家别用了。

设计了三年还没设计出来,这个项目算是死了,大家别用了。

不是还有egg-sequelize么?

ORM & ODM

(SQL) mysql & (NoSQL) mongodb

这个轮子看来是没精力造了

不造ORM?

设计了三年还没设计出来,这个项目算是死了,大家别用了。
https://github.com/eggjs/egg-orm#readme 有了

也许这就是生态吧

我希望这个 orm 能像 mybatis中写 xml 一样, 不然又得学一遍 这个 orm 中的各种语法 使用方法。
最好能像 mybatis 一样, 组装sql

为什么一点音信都没有啊 快点出来啊

Was this page helpful?
0 / 5 - 0 ratings