acolyte

ScalaCompositeHandler

final class ScalaCompositeHandler extends AbstractCompositeHandler[ScalaCompositeHandler]

Linear Supertypes
AbstractCompositeHandler[ScalaCompositeHandler], StatementHandler, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ScalaCompositeHandler
  2. AbstractCompositeHandler
  3. StatementHandler
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ScalaCompositeHandler(qd: Array[Pattern], qh: QueryHandler, uh: UpdateHandler)

Abstract Value Members

  1. abstract def withQueryDetection(arg0: <repeated...>[Pattern]): ScalaCompositeHandler

    Definition Classes
    AbstractCompositeHandler

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def getGeneratedKeys(): ResultSet

    Definition Classes
    AbstractCompositeHandler → StatementHandler
  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. def isQuery(arg0: String): Boolean

    Definition Classes
    AbstractCompositeHandler → StatementHandler
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. def queryDetectionPattern(arg0: <repeated...>[Pattern]): Array[Pattern]

    Attributes
    protected[acolyte]
    Definition Classes
    AbstractCompositeHandler
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. def whenSQLQuery(arg0: String, arg1: List[Parameter]): QueryResult

    Definition Classes
    AbstractCompositeHandler → StatementHandler
    Annotations
    @throws( classOf[java.sql.SQLException] )
  26. def whenSQLUpdate(arg0: String, arg1: List[Parameter]): UpdateResult

    Definition Classes
    AbstractCompositeHandler → StatementHandler
    Annotations
    @throws( classOf[java.sql.SQLException] )
  27. def withQueryDetection(pattern: Pattern*): ScalaCompositeHandler

    Returns handler that detects statement matching given pattern(s) as query.

    Returns handler that detects statement matching given pattern(s) as query.

    import acolyte.Acolyte.handleStatement
    
    // Created handle will detect as query statements
    // either starting with 'SELECT ' or containing 'EXEC proc'.
    handleStatement.withQueryDetection("^SELECT ", "EXEC proc")
  28. def withQueryDetection(arg0: <repeated...>[String]): ScalaCompositeHandler

    Definition Classes
    AbstractCompositeHandler
  29. def withQueryHandler(h: (QueryExecution) ⇒ QueryResult): ScalaCompositeHandler

    Returns handler that delegates query execution to |h| function.

    Returns handler that delegates query execution to |h| function. Given function will be used only if executed statement is detected as a query by withQueryDetection.

    import acolyte.QueryExecution
    import acolyte.Acolyte.handleStatement
    
    handleStatement withQueryHandler { e: QueryExecution => aQueryResult }
    
    // With pattern matching ...
    import acolyte.ParameterVal
    
    handleStatement withQueryHandler {
      _ match {
        case QueryExecution("SELECT * FROM Test WHERE id = ?", ParameterVal(1) :: Nil) => aQueryResult
        case _ => otherResult
      }
    }
  30. def withUpdateHandler(h: (UpdateExecution) ⇒ UpdateResult): ScalaCompositeHandler

    Returns handler that delegates update execution to |h| function.

    Returns handler that delegates update execution to |h| function. Given function will be used only if executed statement is not detected as a query by withQueryDetection.

    import acolyte.UpdateExecution
    import acolyte.Acolyte.handleStatement
    
    handleStatement withUpdateHandler { e: UpdateExecution => aQueryResult }
    
    // With pattern matching ...
    import acolyte.ParameterVal
    
    handleStatement withUpdateHandler {
      _ match {
        case UpdateExecution("INSERT INTO Country (code, name) VALUES (?, ?)", ParameterVal(code) :: ParameterVal(name) :: Nil) => 1 /* update count */   *     case _ => otherResult
      }
    }

Inherited from AbstractCompositeHandler[ScalaCompositeHandler]

Inherited from StatementHandler

Inherited from AnyRef

Inherited from Any

Ungrouped