[ANN] Lafcadio 0.5.2, 0.4.3

Discussion in 'Ruby' started by Francis Hwang, Dec 1, 2004.

  1. 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

    == 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

    Francis Hwang
    Francis Hwang, Dec 1, 2004
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Francis Hwang

    [ANN] Lafcadio 0.4.0

    Francis Hwang, Jun 28, 2004, in forum: Ruby
    Francis Hwang
    Jun 28, 2004
  2. Francis Hwang

    [ANN] Lafcadio 0.6.0

    Francis Hwang, Jan 2, 2005, in forum: Ruby
    Francis Hwang
    Jan 2, 2005
  3. Francis Hwang
    Francis Hwang
    Jan 23, 2005
  4. Francis Hwang

    ANN: Lafcadio 0.8.0

    Francis Hwang, Sep 21, 2005, in forum: Ruby
    Francis Hwang
    Sep 21, 2005
  5. Francis Hwang

    ANN: Lafcadio 0.9.0

    Francis Hwang, Oct 24, 2005, in forum: Ruby
    Francis Hwang
    Oct 24, 2005

Share This Page