The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Lafcadio 0.8.0

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Francis Hwang

Posts: 130
Nickname: francis
Registered: Jul, 2004

Francis Hwang is the Director of Technology at Rhizome.org.
Lafcadio 0.8.0 Posted: Sep 21, 2005 12:52 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Francis Hwang.
Original Post: Lafcadio 0.8.0
Feed Title: Francis Hwang's site: ruby
Feed URL: http://fhwang.net/syndicate/ruby.atom
Feed Description: Author & artist Francis Hwang's personal site.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Francis Hwang
Latest Posts From Francis Hwang's site: ruby

Advertisement

I’ve just released Lafcadio 0.8.0, the new production release. It contains more than 40 new features and bugfixes. And it adds lots of convenience methods to DomainObject, richer query inference operators, real-time query subset caching—all in a slimmer codebase.

Some new features are:

Better operators for query inference:

class User < Lafcadio::DomainObject
 strings :fname, :lname, :email
end
maybe_koreans = User.get { |u| u.lname.in( 'Park', 'Lee', 'Hwang' ) }
no_fname = User.get { |u| u.fname.nil? }

As always, these queries work both against MySQL and against a much faster, in-memory mock object store for use in testing.

Query Caching:

Everytime you run a select against the DB, Lafcadio caches the results in memory. Then, if you later run a second select that is a subset of the first, Lafcadio detects it, figures out what it’s a subset of, filters out the results in memory, and returns you the results. This all happens transparently.

What does this mean? It means a significantly faster app, because if you run these three queries:

select * from users where lname = 'Smith'
select * from users where lname = 'Smith' and fname like '%john%'
select * from users where lname = 'Smith' and email like '%hotmail%'

Lafcadio will only ask MySQL for the results for the first select statement, and do the rest for you without using the DB connection.

Convenience methods for DomainObject:

puts User.exist?
u = User[15]
u.update!( :fname => 'Bill' )
u.delete!
all_users = User.all
first_user = User.first
last_user = User.last

Read: Lafcadio 0.8.0

Topic: Favorite Movie Character Previous Topic   Next Topic Topic: A little RubyForge

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use