On Tuesday, July 31, 2018 at 6:52:45 AM UTC-7, Renato Alves wrote: > > Hi Jeremy, > > Thats really a good idea, thanks! > > I noticed that there is a Sequel::DATABASES array which keeps all > references to connections made without a block. > With the multi tenant environment in mind, its a good practice to look > through this object before make a new connection to check if there is one > already? > > ][`s >
It's a good idea to ignore it and use another approach make sure you only create one Sequel::Database object per tenant, such as a storing connections in a hash keyed by the tenant. You should also consider if using sharding instead of multiple Sequel::Database objects is possible in your application. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
