ruby on rails 3 - CouchDB Database per Main Entity -


I am looking to implement the database for the main unit of the system in my application.

I want to create and set up a database for this unit in the name of a property value.

Like: for a CMS project, to create a couchdate database for each site.

Please, as a rest and based on rail:

I have the value of the property in the form of the form, so I can make the database and save the document in that database I am

But in other ways, how can I get the documents (show, edit, update, delete) in

And in the index method, how can be extended to that scenario

Besides, how can I check that I have a database with the database that does not exist.

Thank you, Shenoda Bertell

You add a document to the main database on each site For example:

{_ id: "site_sitename", DatabaseName: "db_sitename", and type in the form of the site name (with prefix, e.g., "Site_"), type: Site "}

It is impossible to add two documents simultaneously _id so that you can be assured that only one site is present with the given" sitename "to find the database, above the document In Dahrn, "key_ site_name" key to get through your key, and you have easy access to documents of the database to find the name of the property

there.

Hope this will be helpful.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -