[ANN] Lafcadio 0.5.2, 0.4.3

F

Francis Hwang

Hi all,

I've just dropped the next development release of Lafcadio, 0.5.2.
There's also a bugfix release for the stable branch, 0.4.3. Both are
available at http://lafcadio.rubyforge.org .

== What's Lafcadio? ==
An object-relational mapping library for use with MySQL. It supports a
lot of advanced features, including in-Ruby field value checking,
extensive aid in mapping to legacy databases, an advanced query engine
that allows you to form queries in Ruby that can be run either against
the live database, or an in-memory mock store for testing purposes.

Lafcadio is more than a year old and is currently in use on production
websites, most notably http://rhizome.org/, an online community that
has a 6-year-old legacy database and gets more than 3 million hits a
month.

== Why only MySQL? What's up with that? ==
Mainly, Lafcadio is written to support my programming, and MySQL is
what I use. I believe it would be quite easy to adapt it for another
database, but I haven't done so. Part of this is because I'm busy, but
also because I haven't heard from anybody who wants to partner with me
on this. I don't need somebody to program this part, just somebody to
test out new releases with new databases and report lots and lots of
bugs. Please contact me if you're interested.

== What's new in 0.5.2? ==
The biggest change is that all those camel-cased methods and accessors
are now underscored. Man, once you get those Java idioms into your
brain it's hard to get them out.

But there's also a lot more work on the query inference. With previous
versions you were able to call ObjectStore#get_< domain class > to
infer a query:

users = object_store.get_users { |user| user.fname.equals( 'Francis'
) }

But now you can also call Query.infer, in case you want to edit the
query object a bit:

query = Query.infer( User ) { |user| user.fname.equals( "Francis" ) }
users = object_store.get_subset( query )

You can user Query#and and Query#or to modify it in place:

query = query.and { |user| user.lname.equals( "Hwang" ) }
only_me = object_store.get_subset( query )

You can also now query against the primary key field, and boolean
fields implicitly:

old_users = object_store.get_users { |user| user.pk_id.lt( 100 ) }
administrators = object_store.get_users { |user| user.administrator }

And there are a handful of smaller changes, too. See the changelog for
more.

Francis Hwang
http://fhwang.net/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top