O/R Broker 3.2 released

15 views
Skip to first unread message

Nils

unread,
Dec 2, 2011, 6:15:04 PM12/2/11
to orbr...@googlegroups.com
Changes:
  • ExecutionCallback interface completely redesigned. This allows for much better logging, including logging of SQL statement before executing. This is helpful for dynamically created SQL that run for a long time.
  • BrokerBuilder is now BrokerConfig, and a Broker is instantiated like this:
    • val config = new BrokerConfig(ds)
    • val broker = Broker(config)
  • FreeMarker and Velocity now has built-in macros for parameter expansion when using the IN predicate. Examples here: http://code.google.com/p/orbroker/wiki/INPredicate
  • Added TimeZone parameter to date,timestamp,time methods
  • Added selectInto method, for direct streaming into a non-object format, such as JSON straight to a StringBuilder or OutputStream/Writer
  • Automatic translation of Scala collections to FreeMarker and Velocity
  • Added a NoOpExtractor, which returns the Row object itself for inline iteration.
  • Bug fixes:
    • Allow batch execution of statement with no parameters. The primary use case is generated columns.
    • Long standing bug that did incorrect mapping on deeply joined statements

Eduardo M. Cavalcanti

unread,
Dec 5, 2011, 8:44:22 AM12/5/11
to orbr...@googlegroups.com
This is great,
Thank you, Nils.

Yuesong Wang

unread,
Dec 7, 2011, 5:11:32 PM12/7/11
to orbr...@googlegroups.com
Hi,

I'm trying out the velocity support in 3.2. I followed the INPredicate example using a delete statement:

delete from raw where file_id #IN("fileIds")

But it didn't work. Turns out that VelocitySupport.isVelocity(String) returns false for the sql above. I added a dummy variable to make it pass the check:

delete from raw where file_id #IN("fileIds") $!foo

It works, but am I missing something obvious?

Thanks,

Yuesong


Nils

unread,
Dec 7, 2011, 5:24:51 PM12/7/11
to orbr...@googlegroups.com
No, you've found a bug. The current detection assumes that a loop or if statement is present. With the IN predicate, this is now an incomplete assumption. 

I'll get 3.2.1 out shortly.

Thanks!
Reply all
Reply to author
Forward
0 new messages