New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eggjs orm plugin specification #388

Closed
jtyjty99999 opened this Issue Feb 15, 2017 · 10 comments

Comments

Projects
None yet
6 participants
@jtyjty99999
Member

jtyjty99999 commented Feb 15, 2017

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?

@atian25

This comment has been minimized.

Show comment
Hide comment
@atian25
Member

atian25 commented Feb 15, 2017

@popomore

This comment has been minimized.

Show comment
Hide comment
@popomore

popomore Feb 18, 2017

Member

@atian25 maybe RFC

Member

popomore commented Feb 18, 2017

@atian25 maybe RFC

@popomore

This comment has been minimized.

Show comment
Hide comment
@jtyjty99999

This comment has been minimized.

Show comment
Hide comment
@jtyjty99999

jtyjty99999 Feb 23, 2017

Member

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
Member

jtyjty99999 commented Feb 23, 2017

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
@atian25

This comment has been minimized.

Show comment
Hide comment
@atian25

atian25 Feb 24, 2017

Member

only use app/model, not s

Member

atian25 commented Feb 24, 2017

only use app/model, not s

@popomore

This comment has been minimized.

Show comment
Hide comment
@StoneRen

This comment has been minimized.

Show comment
Hide comment
@StoneRen

StoneRen Mar 29, 2017

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.

StoneRen commented Mar 29, 2017

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.

@guzuomuse

This comment has been minimized.

Show comment
Hide comment
@guzuomuse

guzuomuse Mar 29, 2017

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

guzuomuse commented Mar 29, 2017

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

@popomore

This comment has been minimized.

Show comment
Hide comment
@popomore

popomore Apr 28, 2017

Member

We recommend use egg-sequelize, see #388

Member

popomore commented Apr 28, 2017

We recommend use egg-sequelize, see #388

@popomore popomore closed this Apr 28, 2017

@hyurl

This comment has been minimized.

Show comment
Hide comment
@hyurl

hyurl Dec 3, 2017

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

hyurl commented Dec 3, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment