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":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.