ARE_Pre0.0.5 18 Oct 2006
Whats been going on…

Bug Fixes

Two bug fixes which fix some incompatibility issues with ActiveRecord itself.

  • issue #1 was a bug fix for using named placeholders in a conditions array

  • issue #2 was a bug fix if you ever passed nil into the ActiveRecord::Base#find method.

Rakefile

I added a Rakefile tonight which allows you to run:

rake test:mysql

This gives you the ability to test AR:E code with the MySQL database adapter. As more database adapters grow you can expect this to keep adding more databse adapters to the rake task. More importantly a Rake task has been added for testing AR:E with ActiveRecord’s own test suite:

rake test:activerecord:mysql /path/to/active_record  

As more database adapters more will be supported, same as above.

Refactoring

AR:E better finder support is getting refactored to allow for more robust finders to be added for any database adapter. This looks to be heading in the direction of registering finder extensions with an AR:E finder registry. Once the existing finder support is moved to finder extensions they’ll be available for any database adapter they’re supported on.

FULLTEXT index support for MySQL

FULLTEXT index support for MySQL is getting added. It’s going to use a declarative style similar to how most ActiveRecord plugins work, but this won’t have the _”acts_as”_ before the name. Instead it will look like:

class Log < ActiveRecord::Base 
  fulltext :log_index, %W( field1 field2 field3 )
end 

Log.find( :all, :conditions => { :log_index => 'criteria here' }  

This is being done in the form of a finder extensions mentioned in the above refactoring. The beauty of this is that the index identifier (log_index in the above example) can be whatever you want. It will be treated like any other field in the conditions hash that AR:E supports.

FULLTEXT indexes can support some options, so there will be a third optional hash parameter whhich can be passed into the fulltext method to allow you to pass in some options on your index.

Where is this going… ROADMAP

0.0.5 Next Release

AR:E .5.0 this week because of the bug fixes. It includes experimental support for FULLTEXT indexes, but this shouldn’t be used because it is going away now that finder extensions are coming into the picture.

0.0.6

AR:E 0.6.0 will come out within the next two weeks. It will support all current functionality as finder extensions and it will include MySQL FULLTEXT index support.

0.0.7

AR:E 0.7.0 will include some PostgreSQL support. Since finder extensions will be available it will be alot easier to add PostgreSQL specific syntax and/or quirks that I haven’t been able to easily up to this point.

What Else Is Brewing?

There is an acts_as_keyword plugin. It’s a poor man’s plugin for keyword searching WITHOUT the use of anything like Ferret or FULLTEXT indexing.

It works like:

class Log < ActiveRecord::Base 
  acts\_as\_keyword :fields=>%W( field1 field field3 )
end 

Log.find\_by\_keyword( 'some keyword here' )  

In the end it computes OR’d SQL statements on the fields specificed in the acts_as_keyword declaration.


blog comments powered by Disqus