Package

com.lucidchart

relate

Permalink

package relate

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. relate
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait ColReader[A] extends AnyRef

    Permalink
  2. class InterpolatedQuery extends Sql with MultipleParameter

    Permalink
  3. trait MultipleParameter extends Parameter

    Permalink
  4. class NullColumnException extends Exception

    Permalink
  5. trait Parameter extends AnyRef

    Permalink
  6. trait Parameterizable[-A] extends AnyRef

    Permalink
  7. trait ResultSetWrapper extends AnyRef

    Permalink
  8. trait RowParser[A] extends (SqlRow) ⇒ A

    Permalink
  9. trait SingleParameter extends Parameter

    Permalink
  10. trait Sql extends AnyRef

    Permalink

    Sql is a trait for basic SQL queries.

    Sql is a trait for basic SQL queries.

    It provides methods for parameter insertion and query execution.

    import com.lucidchart.relate._
    import com.lucidchart.relate.Query._
    
    case class User(id: Long, name: String)
    
    SQL("""
      SELECT id, name
      FROM users
      WHERE id={id}
    """).on { implicit query =>
      long("id", 1L)
    }.asSingle(RowParser { row =>
      User(row.long("id"), row.string("name"))
    })
  11. class SqlResult extends ResultSetWrapper

    Permalink

    The SqlResult class is a wrapper around Java's ResultSet class.

    The SqlResult class is a wrapper around Java's ResultSet class.

    It provides methods to allows users to retrieve specific columns by name and datatype, but also provides methods that can, given a RowParser, parse the entire result set as a collection of records returned by the parser. These methods are also defined in the Sql trait, and are most conveniently used when chained with parameter insertion. For how to do this, see the Sql trait documentation.

    The extraction methods (int, string, long, etc.) also have "strict" counterparts. The "strict" methods are slightly faster, but do not do type checking or handle null values.

  12. class SqlRow extends ResultSetWrapper

    Permalink
  13. implicit class SqlString extends AnyRef

    Permalink
  14. implicit class SqlStringContext extends AnyRef

    Permalink
  15. class TupleParameter extends MultipleParameter

    Permalink
  16. class TuplesParameter extends MultipleParameter

    Permalink

Value Members

  1. object ColReader

    Permalink
  2. object InterpolatedQuery

    Permalink
  3. object Parameter

    Permalink
  4. object Parameterizable

    Permalink
  5. object RowParser

    Permalink
  6. object SqlResult

    Permalink
  7. object SqlResultTypes

    Permalink

    The SqlResultTypes object provides syntactic sugar for RowParser creation.

    The SqlResultTypes object provides syntactic sugar for RowParser creation.

    import com.lucidchart.relate._
    import com.lucidchart.relate.SqlResultTypes._
    
    val rowParser = RowParser { implicit row =>
      (long("id"), string("name"))
    }

    In this example, declaring "row" as implicit precludes the need to explicitly use the long and string methods on "row".

  8. object SqlRow

    Permalink
  9. object TupleParameter

    Permalink
  10. def tuple(parameters: SingleParameter*): TupleParameter

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped