ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject /branches/IBatisNet.DataMapper-QueryForDataTable
Date Sun, 16 Jul 2006 18:29:52 GMT
Several people (both on the mailing list and people that I've talked to
in person) have asked for IBatisNet to support DataTables. I see a
DataTable as an extended IDictionary that has built-in support for
sorting, filtering, and web service serialization (IDictionary objects
can't be passed to a web service). I think a DataTable is unique enough
and such a core class to .NET that it desrves its own QueryFor* method
instead of calling QueryForObject and casting the returned value.

I started a branch to support DataTables in IBatisNet. I'm slow at
commiting code and I didn't want to wait until I had a giant patch on
my computer that was 100% working until it was commited. Hopefully the
branch will motivate me (and others) to communicate and commit more

I've only added new files to the VS2003 project file. As of last night
I was able to execute a <select> statement and return a DataTable. I
messed around with some other files this morning before I did the
branch. Everything should compile but there's no guarantee that the
branched code will always pass any/all tests.

I also included code that may fix IBATISNET-104 (QueryForXXX do not
check cache before opening/closing connection) by adding a PreExecute
event that is raised right before the IDbCommand is execute. Another
interesting event might be IMappedStatement.RequestScopeCreated. That
may be a better place to open the connection instead of right before
the IDbCommand is executed. Can anyone thing of any other interesting
events? I don't want to add events unless there is a use/need for them.

View raw message