Permalink
Browse files

[scala] Update handleQuery:

```scala
import acolyte.Acolyte.handleQuery

handleQuery { e => res }
```
  • Loading branch information...
cchantep
cchantep committed Nov 20, 2013
1 parent 435fa76 commit 4e7c51b26586ff6b4049b4fd7b73447561dabd07
Showing with 14 additions and 0 deletions.
  1. +14 −0 scala/src/main/scala/Acolyte.scala
@@ -64,9 +64,23 @@ object Acolyte extends ScalaRowLists with ScalaRows with CompositeHandlerImplici
*
* connection { handleQuery }
* }}}
* @todo Remove at 1.0.10
*/
def handleQuery = handleStatement withQueryDetection ".*"
/**
* Creates a new handler detecting all statements as queries
* (like `handleStatement.withQueryDetection(".*").withQueryHandler(h)`).
*
* {{{
* import acolyte.Acolyte._
*
* connection { handleQuery { _ ⇒ res }
* }}}
*/
def handleQuery(h: QueryExecution QueryResult): ScalaCompositeHandler =
handleStatement withQueryDetection ".*" withQueryHandler h
/**
* Pimps result row.
*

0 comments on commit 4e7c51b

Please sign in to comment.