From: Shirai,Kaoru <sh...@ko...> - 2003-02-13 12:57:48
|
Hi. StatementHandle#each(#fetch) always gives the same Row object to block, so we get broken result from StatementHandle#to_a. Example: stat.execute stat.each { |row| p row } stat.execute p stat.to_a Output: ["foo"] ["bar"] ["boo"] [["boo"], ["boo"], ["boo"]] => Should be [["foo"], ["bar"], ["boo"]] We have to use StatementHandle#fetch_all to get correct result. Is there any reason to keep StatementHandle#to_a returning broken array? I suggest making StatementHandle#to_a to be an alias of StatementHandle#fetch_all. -- sh...@ko... Shirai,Kaoru Korinkan Ltd. |