Re: Proposal of some radical changes to API

So at what point does your app learn the structure of the SQL table?

At the moment I know the structure after executing the SQL and fetching
the first row [a ruby hash]. But the field set will change from SQL to
SQL, and Ferret is doing all the field specification for me via
hash-as-doc, ala.

def create
@index = Ferret::Index::Index.new()

conn = ODBC.connect(@odbc[:dsn], @odbc[:uid], @odbc[:pwd])

@sqls.each do |sql|
  stmt = conn.prepare(sql)
  stmt.execute.each_hash{ |row| @index << row }
  stmt.close
  stmt.drop
end

conn.disconnect

end

The field definitions do not change though, so I’m happy as long as the
hash-as-doc support remains in Ferret.

Cheers,

Neville