set_sql problem

[prev] [thread] [next] [Date index for 2004/11/05]

From: Y00R0B0T
Subject: set_sql problem
Date: 21:15 on 05 Nov 2004
Hi,

I'm having a strange little problem  with a set_sql statement and am
wondering if someone here might be able to help.

I have a:

__PACKAGE__->set_sql(blah=>qw{
SELECT now()::date < date_col::date 
FROM __TABLE__
WHERE id=?
});


which I am calling like this:

my $val = $obj->sql_blah->select_val(1);

which keeps giving:

Can't locate object method "date" via package "db_now()::date" at
/usr/lib/perl5/vendor_perl/5.6.1/Ima/DBI.pm line 417.

(note: I get a similar error ( can't locate db_*)  no matter what
columns I am selecting ... )

while my connection was created via: 

Class->connection('dbi:Pg:dbname=dbname','user','login');

when I dump db_Main:

$VAR1 = bless( {}, 'Ima::DBI::db' );



???

-james

set_sql problem
Y00R0B0T 21:15 on 05 Nov 2004

Re: set_sql problem
Michael 22:53 on 05 Nov 2004

Re: set_sql problem
William McKee 03:11 on 06 Nov 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52