How to create databases, collections and rules through Functions

I want to write a function where I enter a name and automatically generate a database (with the name I entered), generate 3 collections (customers, products and sales) and manage the rules for the collections, but I don’t know how to do this.

I didn’t find anything in the documents. It’s possible?

I don’t think it’s possible, and anyway, that’s not a good pattern. Consider using the same database. Use roles and permissions so each user is only able to access its own collections and/or documents.

You’re right. Thank you friend.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.