Slide 202
Slide 202 text
use Acme::BeyondPerl::ToSQL ("dbi:Pg:dbname=$dbname;host=$host", $user, $pas,"","");
my $value = 5;
print 2 + $value , "¥n"; # 7
print 1.2 - 0.2 , "¥n"; # 1
print 9 / 2 , "¥n"; # 4.5
# DEBUG MODE
# use Acme::BeyondPerl::ToSQL ({
# dbi => ["dbi:Pg:dbname=$dbname;host=$host", $user, $pass], debug => 1,
# });
#
# SELECT CAST(2 AS double precision) + CAST(5 AS double precision)
# SELECT CAST(1.2 AS double precision) - CAST(0.2 AS double precision)
# SELECT CAST(9 AS double precision) / CAST(2 AS double precision)