node.js - is there any way to convert mongodb database to waterline db? -


i have 1 file has details of database named xyz.js , file created database using file in mongodb , has various functions adding database etc.the name of file create.js. want convert create.js code using mongodb waterline.

me_aj, there no possible short , simple answer want. nor there tool need. here pointers you'll need do.

1. learn using waterline

it may sound obvious should start getting acquainted waterline , best places waterline project , waterline docs.

by you'll know waterline adapter based orm , you'll have decide adapter use. if using mongodb, looking @ sails-mongo.

2. config waterline connect desired data store

waterline, contrary other orms, has initialised before can start using it. if using outside sails should @ these examples on how set simple app. you'll need configure following specific adapter settings. if connecting mongodb check instructions on sails-mongo project.

3. crud operations

by you've setup waterline initialise , connect chosen data store, it's time things it. similar many other orms. waterline uses methods such find, update, create , destroy perform crud operations, learn more using these check query methods documentation page.

this should enough point in right direction.


Comments