Test-DatabaseRow reviews


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).

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

# proper value, quote it properly
push @conditions, "$field $oper " . $args{dbh}->quote($value);

# 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.

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.

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. :)

Test-DatabaseRow (1.01) *****

Handy module for testing contents of database rows.