在Node.js中使用现有的MySQL模式 [英] Using existing mysql schema in nodejs

查看:99
本文介绍了在Node.js中使用现有的MySQL模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我也尝试使用sequelize和node-orm-但是有没有办法重用现有的mysql模式?我有一个用mysql中的表定义的数据库模式,并想与我的node.js应用程序一起使用(使用express).因此,我不必再次编写定义表的所有定义方法. 任何帮助表示赞赏... 我已经经历了许多stackoverflow问题,例如:其中我应该为Node.js和MySQL使用ORM吗?

I tried using sequelize and node-orm as well - but is there a way to reuse existing mysql schema? I Have a db schema defined with tables in mysql and wanted to use this with my node.js app (using express). So, I don't have to write all the define methods of defining tables again. Any help appreciated... I went through bunch of stackoverflow questions already such as: Which ORM should I use for Node.js and MySQL?

谢谢, JP

推荐答案

结帐 bookshelf.js ,它不需要您可以在模型层中定义架构.

Checkout bookshelf.js, it doesn't require that you define the schema in the model layer.

这篇关于在Node.js中使用现有的MySQL模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆