Hi, I have the following case, I have different products all of which have one main table and N-corresponding tables I decided that I want to namespace each product's tables in separate schema using Postgres.
Now the problem I'm facing is how to organize the Sequel connection. I want to provide web interface that manipulate these products and based on the path prefix in the url to decide which one should be loaded. Playing in Sinatra this scenario I'm faced with some problems: * If I initialize the DB connection outside of the request then multiple request fail because they all shared one connection with one "search_path" set to postgres * If I want to initialize the DB connection I have to require the model files after that in each request I think the cleaner way to go with this is that I have separate connection for each request, but how could I accomplish that, maybe using some middleware like ActiveRecord::ConnectionAdapters::ConnectionManagement I would appreciate any help how to setup this or if you think that using schema in this scenario becomes too complicated. -- You received this message because you are subscribed to the Google Groups "sequel-talk" 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/sequel-talk?hl=en.
