The Artima Developer Community
Sponsored Link

Java Buzz Forum
Thinking About Queries

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
Brian McCallister

Posts: 1282
Nickname: frums
Registered: Sep, 2003

Brian McCallister is JustaProgrammer who thinks too much.
Thinking About Queries Posted: Nov 15, 2003 9:13 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Brian McCallister.
Original Post: Thinking About Queries
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
Latest Java Buzz Posts
Latest Java Buzz Posts by Brian McCallister
Latest Posts From Waste of Time

Advertisement

I got into a very fun discussion with James Strachan about Groovy Data Objects -- which are modeled more after ADO than JDO. GDO looks like

collection.select { where { b > 100 && b < 5000 } orderBy { ascending { [ b, c] } desceding { x } }

Or, for projections

collection.select { property b { get { bar.order.amount} set { bar.order.amount = it } } where { b > 100 && b < 5000 } orderBy { ascending { [ b, c] } desceding { x } }

The idea of a query as an closure is appealing. I may have to try to do a GDO style query-as-closure for OJB during the hackathon. Groovy provides access to the AST of GroovyObjects, so traversing that building a query-by-criteria shouldn't be terrible. Off to code I go.

Read: Thinking About Queries

Topic: iTunes for Windows Previous Topic   Next Topic Topic: Velocity whitespace handling is not as written

Sponsored Links



Google
  Web Artima.com   

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