Markus Hoenicka wrote:
Hi,
Frederic Gonieaux writes:
> Hi,
>
> Most of the dbi drivers don't handle correctly the column types
> unsigned int and unsigned long long.
>
SQL does not support unsigned integers. Unsigned integers are a MySQL
extension of the standard and as such not portable. At least SQLite,
PostgreSQL, and Firebird do not use unsigned integers (maybe Oracle
does, I don't know).
The current behaviour emulates unsigned integers in a portable way
which works across all supported database engines. It is questionable
whether your mysql driver patch would offer that much benefit as the
extended range of unsigned integers would be limited to users of that
driver.
I'm open for discussions whether this is a useful feature or not.
Ok, I didn't know that, please excuse my newbiness.
Using libdbi for a school project, I've only tried my code
on MySQL so far.
I was actually confused by the functions dbi_result_get_uint,
dbi_result_get_ulong, dbi_result_get_ulonglong.
I was expecting that these functions return full unsigned integers,
well at least for MySQL.
IMO, it would be a good thing to make clear the behavior of these
functions in the documentation.
I think portability shouldn't be dictated by the library.
That way, we can optimize for certain databases, and still keep
compatibility with others.
Take care.
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
libdbi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libdbi-devel