RSS | Module Info | Add a review of Test-DatabaseRow
Test-DatabaseRow
(1.04)
I found that the module does not always construct a SQL WHERE clause properly. Integers are quoted (where age = '23') although they should not be (where age = 23). With quoted ints the sql call fails on sybase. Tested with DBD::Sybase, (version 0.90 with freetds-based client libraries on linux and the 1.09 sybase-based client libraries on solaris).
Workaround:
The source code is quite easy to read and understand, so, in the DatabaseRow.pm file, I changed the last lines of the _build_select() method
BEFORE
# proper value, quote it properly
push @conditions, "$field $oper " . $args{dbh}->quote($value);
AFTER
# proper value, quote it properly
if ($value =~ /^$RE{num}{real}/){
push @conditions, "$field $oper " . $value;
} else {
push @conditions, "$field $oper " . $args{dbh}->quote($value);
}
Not sure if this is the right place to submit code like this, but it may not even a bug in the first place - just a misconfiguration on my side.
Knut Behrends - 2009-08-07T02:35:25 (permalink)
1 out of 3 found this review helpful.
Was this review helpful to you?
Yes
No
Test-DatabaseRow
(1.03)
Very, very useful for testing database contents.
I found the various ways to specify the SQL query to be overly complex for my taste. I pass in simple SQL strings instead.
Johan Lindström - 2004-04-07T05:05:07 (permalink)
1 out of 1 found this review helpful.
Was this review helpful to you?
Yes
No
Test-DatabaseRow
(1.01)
I've used this module and found it works well. I find I have to double check my syntax a little more often than I'd like, but I'm still somewhat new to use it. It seems like it could have a little easier interface, but it's not clear to me exactly what that might be. :)
Mark Stosberg - 2003-09-07T19:32:51 (permalink)
1 out of 1 found this review helpful.
Was this review helpful to you?
Yes
No
Test-DatabaseRow
(1.01)
Handy module for testing contents of database rows.
Adrian Howard - 2003-09-07T15:03:31 (permalink)
1 out of 1 found this review helpful.
Was this review helpful to you?
Yes
No

