I saw that syntax on a blog a few days ago, but I did not try it with
version 7.6.

The db4o team has been really dedicated to C# and LINQ in the past few
versions, to I would image the library will become more friendly to
languageas like Scala.

On Oct 6, 12:08 am, "Bjarte S. Karlsen"
<[EMAIL PROTECTED]> wrote:
> efleming969:
>
>
>
> > I've added a project to github under the name of liftyourdb4o.
>
> I looked at db4o in the #scala channel and got this nice query method to 
> work. It needs db4o 7.6 though (I tried with 7.4 and it fails since the match 
> method retuns an Object and not a T), since it has a fix that allows match to 
> get an Object.
>
>  def query[T](filter:T => boolean) = {
>     db.query(new Predicate[T]() {
>       def `match`(entry: T): boolean = {
>          filter(entry)
>       }
>     });
>   }
>
> So basically you could do
>
> val result = query[Course](_.name.equals("Scala"))
>
> --
> With kind regards  / Med vennlig hilsen,
> Bjarte Stien Karlsen (GPG: 0x626B2F3A)
> To find out the limits of the possible you have to go beyond them into the
> impossible.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to