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
|