Is there something simple I'm missing here?
the database plugin won't do anything fancy, it was a proof of concept to show how to handle DBI in Mojolicious
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious...@googlegroups.com.
To post to this group, send email to mojol...@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.
...and had hoped that plugin would manage the database connection and keep it alive will do some further reading on that.
Im concerned that there is no way to prepare statements is Mojo::mysql a commonly used module is it a god choice to go with?
Im concerned that there is no way to prepare statements is Mojo::mysql a commonly used module is it a god choice to go with?
# Insert a two rows my $qry = $db->prepare('insert into names (name) values (?);'); $qry->execute('Sara'); $qry->execute('Stefan');
# Insert a two rows my $db = $pg->db; $db->query('insert into names (name) values (?)', 'Sara'); $db->query('insert into names (name) values (?)', 'Stefan');
2. I don't know how many times the Mojo::Pg version is preparing the statement so it may be less efficient than DBI?
It not only prepares and caches statement handles, it also stores statement handles with the database handle.