I'm working on an update to sqlite-ruby (incorporating Ara's arrayfields module as an alternative to using a Hash), and I have a question.
Currently, columns in each result set are indexed starting with '1'. Why? Mostly because that's the way other database systems I've used do it (like JDBC). When using an array to store these results, though, it doesn't seem to make as much sense to use 1-based column indices (imagine doing an 'each' on the row and having to add logic to skip the first element -- at index 0).
So, I'm tempted to just start the indexing at index 0. However, I'm planning on leaving the hash-based implementation in as well, so that users can optionally select on or the other (and so that they don't have to go and install arrayfields if they don't already have it). Should I change the hash-based implementation to use a 0-based indexing system as well? If so, how large of an impact will that have on existing systems?
Any thoughts?
ยทยทยท
--
Jamis Buck
jgb3@email.byu.edu
http://www.jamisbuck.org/jamis
ruby -ropenssl -e'k="01234567";p((c,c.padding,c.iv,c.key=OpenSSL::Cipher::BF.new,0,k,k*2)[0].decrypt.update("1A81803C452C324619D319F980D5B84DBB45FC0FE2BAA045".scan(/../).map{|n|n.to_i(16).chr}.join))'