[feature] DBD-SQLite ResultSet should access rows on demand

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[feature] DBD-SQLite ResultSet should access rows on demand

Holger Hans Peter Freyther-3
Issue status update for
http://smalltalk.gnu.org/node/671
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/671

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    DBI
 Category:     feature requests
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  zecke
 Updated by:   zecke
 Status:       active

   populate [
       
       | resCode |

       rows := OrderedCollection new.
       [ resCode := self handle exec.
         resCode = 100
       ] whileTrue: [rows addLast:
                       (SQLiteRow forValues: self handle returnedRow
copy in: self)].

       self handle checkError: resCode = 101.
   ]

should be written in a way that it can be streamed without allocating
everyting to memory at once.



_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [feature] DBD-SQLite ResultSet should access rows on demand

Holger Freyther
On Mon, Nov 19, 2012 at 08:09:02AM -0700, Holger Hans Peter Freyther wrote:

Hi,

the change is easy but it has complications...  It appears that the low
level sqlite3 API does not allow to query how many rows are inside a result
set. Is it acceptable to make rows throw an exception? Or should rows fetch
all rows? Or should I add new API for not fetching everything into memory?

holger



_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk