我们可以将Meteor框架与mysql数据库一起使用吗 [英] Can we use Meteor framework with mysql database

查看:60
本文介绍了我们可以将Meteor框架与mysql数据库一起使用吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现许多Meteor框架的引用URL,在这里我发现mongodb作为数据库,因为我对mongodb的了解不多.那么有什么方法可以实现mysql而不是mongodb

I found many refer url for Meteor framework where i found mongodb as database, since i don't have much knowledge in mongodb. So is there any way to implement mysql instead of mongodb

推荐答案

有一种 的方法,但是在目前阶段该框架还没有铺平道路.基本上,您需要编写一个包装程序,该包装程序将从SQL转换为Meteor的Minimongo,然后返回.如果您还不是流星和Mongo的主人,那将是不可行的任务.

There is a way, but at the stage the framework is right now it's an unpaved road. Basically, you'd need to write a wrapper that would translate from SQL to Meteor's Minimongo and back. It's not a feasible task if you're not a Meteor and Mongo master already.

有人试图编写这样的适配器.我知道的最高级的是: https://github.com/drorm/meteor-sql .可以使用它来玩耍,但是我不认为它已经可以生产了.另外,目前没有的方法可以将Meteor帐户系统用于除Mongo之外的任何其他程序.无论如何,您要么需要使用它来存储用户帐户,要么放弃他们提供的极大便利.

There were attempts to write such adapter. The most advanced I know is this: https://github.com/drorm/meteor-sql . It's possible to use to play around, but I don't think it's production ready. Also, there is currently no way to use Meteor account system with anything other than Mongo. You either need to use it anyway for user accounts, or give up a great convenience they provide.

我建议您与Mongo一起尝试目前的Meteor,它比您想象的要容易.它并不会增加太多的学习曲线,而且除了过滤器和更新运算符外,您根本不会注意到您在使用一些奇怪的数据库-就像使用本机Javascript对象一样.没有架构,没有迁移,也不需要对象映射.您只需要获取数据,将其放入一个集合中,然后就可以忘掉SQL使您想到的所有其他内容.

I'd advice you to try Meteor as it currently is, together with Mongo - it's easier than you think. It doesn't add too much learning curve, and besides filter and update operators you won't notice that you use some strange db at all - it's just like working with native Javascript objects. There's no schema, no migrations, no object mapping needed. You just take data, put it in a collection and forget all the rest that SQL made you think about.

这篇关于我们可以将Meteor框架与mysql数据库一起使用吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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