Re: DBD::Oracle, Support binding of integers so they are returned as IVs

Martin Evans <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Organization Easysoft Limited
Message-ID <[email protected]>
Greg Sabino Mullane wrote:
> 
>> With reference to the rt I created "Support binding of integers so they
>> are returned as IVs" at http://rt.cpan.org/Public/Bug/Display.html?id=49818
> 
> If I'm understanding you correctly, this was recently 'fixed' in DBD::Pg,
> to accomodate JSON::XS as well. For the relevant code, see:
> 
> http://svn.perl.org/modules/DBD-Pg/trunk/dbdimp.c
> 
> and grep for "cast"
> 

I could do what DBD::Pg does here (and have to verify it works) but
Oracle integers can be very large - too big to fit in an IV in some
cases. I think the only person who knows if an integer is small enough
to fit in an IV is the person calling bind_col and in any case, my
situation is in fact that some of the database integers I need back as
strings and some I want as integers. As a result, I think it is
necessary to support the TYPE attribute to bind_col.

1. Does any DBD support TYPE in bind_col (I can't find any so far)?

2. Presumably if a DBD wanted to store the TYPE would it need to
implement the bind_col (dbd_st_bind_col) method itself?

Martin
-- 
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.