pharo-rdbms / Pharo-SQLite3

Community-owned official SQLite3 binding for Pharo
MIT License
22 stars 20 forks source link

5-Dont-fetch-column-names-for-every-row #6

Closed pharo-todd closed 4 years ago

pharo-todd commented 4 years ago

Several changes to SQLite3Row to avoid fetching the columnNames for every row (fetch em once on the cursor and share them with the rows). Also changed internal storage to array as it is a bit leaner when you have a lot of objects. Don't fret though, values still returns a combined dictionary, asDictionary added for just the name keys, and asArray only returns the values in column order.

astares commented 4 years ago

Fixes #5

astares commented 4 years ago

Checked on Windows - fine from my side. The dictionary approach led to some trouble anyway (I've seen yesterday that columnames was not working in the old approach) - we should add more tests in the future.

Let @PierceNg have a review too before we merge