On 14/01/2008, at 8:57 AM, Lachlan Deck wrote:

I don't think this works. i.e., I don't think it's up to the user to determine the type returned for a data row fetch. That's a function of the framework as far as I see it.

How about this?
List<DataRow> dataRows = context.performRawQuery(query1)

I agree... just to flesh out what Lachlan said: you might have a query which is constructed in one place (which also sets up the expression, etc) and then passes it to another bit of code to perform the query and deal with the results. It should not be predetermined what type of results are returned, but up to the code which performs the query to make that choice.

Otherwise as Andrus' suggestion stands you have to make that choice at the time of constructing the query, making queries less reusable. The other benefit is that Select then always has the type of the class it is querying. This may prove useful in other places.


Ari Maniatis


-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A


Reply via email to