On May 11, 12:38 am, deepak <[email protected]> wrote: > sorry there are a bunch of basic questions on connecting to the > database: > > 1) how does do_mysql and mysqlplus play along, are'nt they seperate > and mutually exclusive? if we connect using do_mysql and mysqlplus is > also installed then how do they work together?
If you use the do adapter with mysql, you will be using do_mysql. If you use the mysql adapter, it will default to mysqlplus, and fall back to mysql if mysqlplus is not installed. > 2) is anyone using mysqlplus, what is recommended do_mysql or > mysqlplus. I did some testing and the do adapter with do_mysql is a little faster. However, the mysql adapter with mysqlplus supports prepared statements and stored procedures. So it depends what you are trying to do. > 3) using do_mysql can i specify a connection pool? would it make sense > to add a DB.do method to connect using a dataobject connection > string. Every Sequel::Database has it's own connection pool. You can specify your own connection pool class, but you can't provide an existing connection pool. There is already a Sequel.do method to connect using the do adapter, though I'm not sure how well it works. I recommend you use Sequel.connect and preface the connection string with do: > 4) another basic question - do_mysql is non-blocking then that is the > usecase of a connection-pool. when would the combination of do_mysql/ > mysqlplus apapter and connection-pool be helpful. Again, you are confusing the issue. do_mysql and mysqlplus are not related. A connection pool is necessary for thread safety, especially when queries do not block the interpreter. Jeremy -- 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.
