Re: WebDatabase review: SQLResultSetRowList

On Mon, 31 Aug 2009, Nikunj R. Mehta wrote:
>
> SQLResultSetRowList
> 
> The item() method may take a long time to process.  Shouldn't this have an
> asynchronous version with a callback?
> The ability to randomly access rows in the row set increases the likelihood
> that the item operation will take an arbitrarily long time. Plus, supporting
> random access is very expensive on limited memory devices.

The UA is expected to prefetch all of the data before invoking the 
callback, in the async case, to avoid this problem.


> Offer next() and previous() methods that returns the next and previous row
> respectively.
> Offer absolute() and relative() call that may fail.  See
> java.sql.ResultSet.absolute() and java.sql.ResultSet.relative().

I'll leave this for a future version.


> The length attribute could require accessing all the rows, which would use too
> much memory on limited memory devices.

The implementation can use TOO_LARGE_ERR in those cases.


> Specify that the SQLResultSetRowList that resulted from a call to
> SQLTransaction.executeSql() can only be accessed during the execution of the
> associated SQLStatementCallback

It is intended to be permanently accessible.


> Property names on result sets are based on column names used in the 
> query or defined in the view/table. These name sources (colmns, 
> selections) are case insensitive but the row object would have to use 
> case-sensitive names. Is there a way that objects can be accessed 
> without case insensitivity?

In the API, the names are case-sensitive (using the case returned by the 
database).

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 1 December 2009 01:34:09 UTC