Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
Hay,

I'm using sqlrelay and Rose::DB and it partly works in conjunction with Catalyst and mysql5.0.38 on a debian box. Partly, because any SELECT statements (even complex ones) generated by Rose::DB are executed.

Reading the database works.

Unfortunately I didn't get any INSERT or UPDATE statements to work.

my $product = My::Product->new( name=> 'boo', text=>'foo'); $product->save();
results in an Exception
DBD::SQLRelay::st execute warning: You have an error in your SQL synta +x; check the manual that corresponds to your MySQL server version for + the right syntax to use near ':1, :2, 'boo', 'foo', '' )' at line 11 at /usr/local/share/perl/5.8.8/Rose/DB/Object.pm line 11 +10.
That line the statement and it's bindings are generated:
if($meta->dbi_requires_bind_param($db)) { my $i = 1; foreach my $column ($meta->columns) { my $method = $column->accessor_method_name; $sth->bind_param($i++, $self->$method(), $column->dbi_bin +d_param_attrs($db)); } $sth->execute; } else { # IT'S THIS NEXT LINE PRODUCING THE ERROR $sth->execute(map { $self->$_() } $meta->column_accessor_met +hod_names); }

Humm.. I'm still evaluating this. Unfortunately I'm stuck to mysql as it offeres a very cheap - by meaning of money - clustering solution.

Meanwhile I end up in having a two connects: one directly to mysql and another to the sqlrelay delivering reading performance.

But this isn't really the muslti-master thing I wanted to have ;-(

So I think I have to investigate on and patch this binding mechanism or otherwise have to cope with this limitation


In reply to Re: Rose::DB and sqlrelay by mart
in thread Rose::DB and sqlrelay by InfiniteLoop

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.