From: NHibernate J. <mik...@us...> - 2006-11-20 17:29:28
|
Streaming ResultSet support --------------------------- Key: NH-821 URL: http://jira.nhibernate.org/browse/NH-821 Project: NHibernate Type: New Feature Components: Core Reporter: Jerry Haltom Priority: Trivial NHibernate should provide support for streaming results. A set of methods such as IQuery.List<T>(ListCb<T> cb, int pageSize) could be introduced to support this. The basic idea is that it would result in NH going to the database layer and invoking the callback periodically as it reads and hydrates instances from the underlying databaes connection. This would not be asynchronous. The major use case for this is in populating a large list view with results as they arrive from the database, when the database supports streaming result sets. The UI could issue a query along with a callback to be invoked when data arrives. As the callback is invokved, the UI would add the data to it's display. This would result in my faster responding interfaces. This requires a NH Session to be reentrant. Unsure if this is the case currently. The callback will receive instances which the callback may directly manipulate. If it receives an instance which is a proxy, and it attempts to access a property of it which is lazy, it would result in NH intercepting it and reentering it's own code to issue the query for the lazy properties. No async support would be attempted. The callback would be invokved by NH directly on the thread which originally entered NH. It would be up to the programmer of the callback. The end result of this is that the UI can start filling in results as the database works to retrieve those results, which might be the case for very long queries. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.nhibernate.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |