本文介绍了我们可以从哪里确定使用“风帆猫鼬"的集合名称.包,在node.js + sailsjs中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在adapter.js中有用于与mongo连接的代码,其中包含用户名,密码,主机,DBName等,模型中的模式对于CRUD,我们可以在控制器中进行编码.但是我们从哪里可以选择蒙哥数据库的特定集合呢?

I had code for Connection with mongo with username, password, host, DBName etc in adapter.js,schema in model,and for CRUD we can code in controller. but from where can we select particular collection of selected DB of mongo?

推荐答案

我是 Sails-mongoose 的创建者.我还没有真正继续进行sails-mongoose的工作,因为要使用mongoose,您将不得不删除完全内置在Sailsjs生态系统中的Waterline.

I am the creator of Sails-mongoose. I've not really continued my work with sails-mongoose because to use mongoose, you will have to cut out Waterline which is built completely into the eco system of Sailsjs.

我建议针对我自己建立的图书馆使用

I would recommend using against the library i myself built.

道歉和谢谢

这篇关于我们可以从哪里确定使用“风帆猫鼬"的集合名称.包,在node.js + sailsjs中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 17:39