Trait

com.lucidchart.relate

CollectionsSql

Related Doc: package relate

Permalink

trait CollectionsSql extends AnyRef

CollectionsSql is a trait for collection 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)
}.asCollection(RowParser { row =>
  User(row.long("id"), row.string("name"))
})
Self Type
Sql
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CollectionsSql
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def asCollection[U, T[_]]()(implicit arg0: RowParser[U], factory: scala.collection.compat.Factory[U, T[U]], connection: Connection): T[U]

    Permalink
  5. def asCollection[U, T[_]](parser: (SqlRow) ⇒ U)(implicit factory: scala.collection.compat.Factory[U, T[U]], connection: Connection): T[U]

    Permalink

    Execute this query and get back the result as an arbitrary collection of records

    Execute this query and get back the result as an arbitrary collection of records

    parser

    the RowParser to use when parsing the result set

    connection

    the connection to use when executing the query

    returns

    the results as an arbitrary collection of records

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def asPairCollection[U, V, T[_, _]]()(implicit factory: scala.collection.compat.Factory[(U, V), T[U, V]], connection: Connection, p: RowParser[(U, V)]): T[U, V]

    Permalink
  8. def asPairCollection[U, V, T[_, _]](parser: (SqlRow) ⇒ (U, V))(implicit factory: scala.collection.compat.Factory[(U, V), T[U, V]], connection: Connection): T[U, V]

    Permalink

    Execute this query and get back the result as an arbitrary collection of key value pairs

    Execute this query and get back the result as an arbitrary collection of key value pairs

    parser

    the RowParser to use when parsing the result set

    connection

    the connection to use when executing the query

    returns

    the results as an arbitrary collection of key value pairs

  9. def clone(): AnyRef

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def executeInsertCollection[U, T[_]](parser: (SqlRow) ⇒ U)(implicit factory: scala.collection.compat.Factory[U, T[U]], connection: Connection): T[U]

    Permalink

    Execute the query and get the auto-incremented keys using a RowParser.

    Execute the query and get the auto-incremented keys using a RowParser. Provided for the case that a primary key is not an Int or BigInt

    parser

    the RowParser that can parse the returned keys

    connection

    the connection to use when executing the query

    returns

    the auto-incremented keys

  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped