I was poking around in merb_datamapper because I remembered it allowed multiple repo's in the yml file and found this:
http://github.com/wycats/merb/blob/ffff732093da6d300b4652616a8fa150ec758331/merb_datamapper/lib/merb/orms/data_mapper/connection.rb#L45 It appears that setup can be called over and over again. The question is, can we setup and then tear down repo's as needed? On Aug 15, 12:45 pm, Roy Wright <[email protected]> wrote: > In a similar vein, I've been thinking about having an application that > would use a zero or more private local repositories, zero or more > public local repositories for sharing with others, and zero or more > remote repositories, all with the same schema. Then the application > would use filters to select records from all the repositories. Would > also need the ability to move/copy records between repositories. > > My rationale for using multiple local repositories is mainly security > then organizational. I.e., the user could create the repository as > private local, then when they are satisfied with it, promote it to > public for sharing. > > Regardless, multiple repository support would be needed for accessing > multiple remote repositories. > > Have fun, > Roy > > On Aug 15, 2009, at 11:14 AM, myobie wrote: > > > > > > > It's just theory right now, but it does allow for better sandboxing to > > keep everyone's data in different data stores. > > > I am not sure how one might add / remove repositories at runtime. It > > might require a restart of the app when a new repo is added. > > > Any ideas on dynamic repositories while running? That may not be > > threadsafe? > > > On Aug 10, 12:15 am, Thanatos <[email protected]> wrote: > >> May be possible, but certainly not recommended. Just out of an > >> architectural curiosity: why a data-store per user? That seems like a > >> giant red flag to me. > > >> For informational > >> purposes:http://datamapper.org/doku.php?id=getting_started_with_datamapper&s > >> []=datamapper&s[]=setup > >> Notice how a symbol is passed in, that can be a unique identifier > >> associated with a user. A string username symbolized or something > >> like > >> that. > > >> On Aug 8, 3:59 pm, myobie <[email protected]> wrote: > > >>> Is it possible to create repositories on an ad-hoc basis? I have a > >>> project where each user will have a data store, so each model will > >>> need to be able to change it's repository url based on which user it > >>> belongs to. Is that even possible? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
