On Thu, 24 Nov 2011 13:09:41 -0500, Kagamin wrote: > > It seems this has no connection to columns whatsoever. Whatever data you > receive from server, it's type is encoded in the received data packet. > One may want to match types exactly or do sensible conversions like > round a float to int or parse int from string. You don't want to have > count(*) return an int32 on mssql and int64 on oracle and crap up if you > requested, say, int32.
Cases like count() and other function results are problematic. What I am trying to do is define interfaces with a graduated approach to output binding or translation. The simplest case would be doing this entirely on auto. You'd issue a query, and get back a set of variants whose types were set up on the basis of information about 'column' types received after the execution of the query. In many cases that would be sufficient. In more complex cases you would add qualifications to the binding to specify e.g. that a specific column should translate the result to the most capable integral type, or that the received value should be dealt with in chunks, and so on. Steve
