On Friday, July 27, 2018 at 2:40:04 PM UTC-7, Renato Alves wrote: > > Hi Jeremi, > Thanks for your answer! > > We are building a service like Chart.io, where customer pass their > Database Connectiosn. Its a multi tenant application, so we created > Database Connections at runtime because we have to validate database, > connections, etc. > > In this case, do you think Sequel a bad option, or you think there is > another way? >
In this case, you should pass a block when creating the database, so it will disconnect and remove the internal reference after the block exits. Alternatively, you can use the :keep_reference=>false option when creating the database connection, so Sequel doesn't keep an internal reference to it. When using the :keep_reference=>false option, you should also call Database#disconnect manually after you are done using the Database instance. 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.
