From: Jeremy Hinegardner Date: 2008-07-07T09:30:52+09:00 Subject: Re: #pragma and index_info() was ([ANN] amalgalite 0.2.1 Released) Replace this section with > db.pragma("index_info( #{index.name} )") do |index_field| > pragma_info.each do |ci| > puts " |#{ci.rjust( pragma_max_width, "." )} : #{index_field.send( ci )}" > end > end db.pragma("index_info( #{index.name} )").each do |index_field| pragma_info.each do |ci| puts " |#{ci.rjust( pragma_max_width, "." )} : #{index_field[ ci ]}" end end > then it seems that db.pragma("index_info( #{index.name} )") returns an > empty array, although the source code gives: > # File lib/amalgalite/database.rb, line 440 > 440: def pragma( cmd ) > 441: execute("PRAGMA #{cmd}") > 442: end Database#pragma does not accept a block. that is what is going on. #execute dos and there's a difference there. The block attached to your #pragma call is not getting executed. For now I've added a todo to fix this for the next release and also to have the Amalgalite::Index class do the index_info() call itself and make the seqno, ci and name available via some API. enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner jeremy@hinegardner.org