Patent ID: 8019831

Claim:
A method implemented at least in part by a computer, the method comprising: receiving, at a database driver, a query that defines a data set available from a database, the query associated with information indicating whether a requestor is allowed to obtain previously obtained data from the database driver during the query; receiving a first request to read a first data value of the data set; and in response to the first request: retrieving a first set of zero or more blocks of data from the database corresponding to data that occurs in the data set before the first data value; storing each of the blocks that is still allowed to be obtained during the query in a buffer; discarding each of the blocks that is not still allowed to be obtained in the query, retrieving a second set of zero or more blocks of data corresponding to the first data value; storing the second set of zero or more blocks of data in the buffer; and marking a block associated with a data value that has a non-stream access mode to lock the block until the requestor is no longer allowed to obtain the block during the query.