is it possible to create my own collections in documentStore
-
is it possible to create my own collections in documentStore?
if not, It is possible to use the connection that jsreport creates with mongo?
I need to add collections
Thank you so much!!!
-
You can create your collections, here is some documentation
https://jsreport.net/learn/custom-extension#document-storeYou find many examples in jsreport extensions' source code, like here
https://github.com/jsreport/jsreport/blob/master/packages/jsreport-components/lib/main.js#L17You can reach the MongoDB connection on
jsreport.documentStore.provider.db.collection('xxx')...
Here are the sources
https://github.com/jsreport/jsreport/blob/master/packages/jsreport-mongodb-store/lib/provider.js
-
Thank you so much!!!