Class

io.slicker.postgres

PostgreSQLRepository

Related Doc: package postgres

Permalink

abstract class PostgreSQLRepository[Id, E, R, T <: TableWithId[Id, R]] extends Repository[Id, E]

Linear Supertypes
Repository[Id, E], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PostgreSQLRepository
  2. Repository
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PostgreSQLRepository(table: RecordTable[Id, E, R, T])(implicit arg0: BaseTypedType[Id], entity: Entity[E, Id])

    Permalink

Type Members

  1. implicit class QueryWithPageRequest[UQ, CQ[_]] extends AnyRef

    Permalink

    Helper for using PageRequest along with slick

    Helper for using PageRequest along with slick

    Attributes
    protected
  2. type ReadAction[A] = DBIOAction[A, NoStream, Read]

    Permalink
    Definition Classes
    Repository
  3. type WriteAction[A] = DBIOAction[A, NoStream, Write]

    Permalink
    Definition Classes
    Repository

Abstract Value Members

  1. implicit abstract val ec: ExecutionContext

    Permalink
    Attributes
    protected

Concrete 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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def countAll: ReadAction[Int]

    Permalink

    Count all rows in table

    Count all rows in table

    returns

    Number of rows

    Definition Classes
    PostgreSQLRepository → Repository
  7. def countBy[P <: (PostgresDriver.api)#Rep[_]](f: (T) ⇒ P)(implicit canBeQueryCondition: CanBeQueryCondition[P]): ReadAction[Int]

    Permalink

    Count rows by predicate.

    Count rows by predicate. {{ countBy(_.foo === "bar") }}

    P

    Type of predicate. it's not a boolean but slick internal

    f

    predicate

    canBeQueryCondition

    Proof that result of predicate could be a query condition

    returns

    Number of rows that satisfied predicate

    Attributes
    protected
  8. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def findAll(pageRequest: PageRequest = PageRequest.ALL): ReadAction[Seq[E]]

    Permalink

    Find all entities

    Find all entities

    pageRequest

    request could be limited with offset/limit

    returns

    All entities in table in respect with pageRequest parameter

    Definition Classes
    PostgreSQLRepository → Repository
  12. def findAllBy[P <: (PostgresDriver.api)#Rep[_]](f: (T) ⇒ P, pageRequest: PageRequest = PageRequest.ALL)(implicit canBeQueryCondition: CanBeQueryCondition[P]): ReadAction[Seq[E]]

    Permalink

    Find all entities by predicate

    Find all entities by predicate

    P

    type of predicate. it's not a boolean but slick internal

    f

    predicate

    pageRequest

    page request to limit/offset query

    canBeQueryCondition

    proof that result of predicate could be a query condition

    Attributes
    protected
  13. def findById(id: Id): ReadAction[Option[E]]

    Permalink

    Find entity by id

    Find entity by id

    returns

    Option with entity. None in case if there is no such entity.

    Definition Classes
    PostgreSQLRepository → Repository
  14. def findOneBy[P <: (PostgresDriver.api)#Rep[_]](f: (T) ⇒ P)(implicit canBeQueryCondition: CanBeQueryCondition[P]): ReadAction[Option[E]]

    Permalink

    Find one entity by predicate

    Find one entity by predicate

    P

    type of predicate. it's not a boolean but slick internal

    f

    predicate

    canBeQueryCondition

    proof that result of predicate could be a query condition

    returns

    First entity that satisfied given predicate. If there is no such entity, None will be returned

    Attributes
    protected
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. def id(e: E): Option[Id]

    Permalink
    Attributes
    protected
  18. final def isInstanceOf[T0]: Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def remove(es: Seq[E]): WriteAction[Boolean]

    Permalink

    Remove entities

    Remove entities

    returns

    True in case if at least one of entities was removed

    Definition Classes
    PostgreSQLRepository → Repository
  23. def remove(e: E): WriteAction[Boolean]

    Permalink

    Remove entity

    Remove entity

    returns

    True in case if entity was removed

    Definition Classes
    PostgreSQLRepository → Repository
  24. def removeAll(): WriteAction[Boolean]

    Permalink

    Remove all entities in table

    Remove all entities in table

    returns

    True in case if at least one of entities was removed

    Definition Classes
    PostgreSQLRepository → Repository
  25. def removeBy[P <: (PostgresDriver.api)#Rep[_]](f: (T) ⇒ P)(implicit canBeQueryCondition: CanBeQueryCondition[P]): WriteAction[Boolean]

    Permalink

    Remove rows from table by predicate.

    Remove rows from table by predicate. {{ removeBy(_.foo === "bar") }}

    P

    Type of predicate. it's not a boolean but slick internal

    f

    predicate

    canBeQueryCondition

    Proof that result of predicate could be a query condition

    returns

    true in case if one more rows were removed

    Attributes
    protected
  26. def removeById(id: Id): WriteAction[Boolean]

    Permalink

    Remove entity by id

    Remove entity by id

    returns

    True in case if entity was removed

    Definition Classes
    PostgreSQLRepository → Repository
  27. def save(es: Seq[E]): WriteAction[Seq[E]]

    Permalink

    Insert or updates entities in DB

    Insert or updates entities in DB

    es

    entities

    returns

    inserted or updated entities

    Definition Classes
    PostgreSQLRepository → Repository
  28. def save(e: E): WriteAction[E]

    Permalink

    Insert or updates entity in DB

    Insert or updates entity in DB

    e

    entity

    returns

    inserted entity with new ID or updated entity

    Definition Classes
    PostgreSQLRepository → Repository
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. val table: RecordTable[Id, E, R, T]

    Permalink
    Attributes
    protected
  31. val tableQuery: (PostgresDriver.api)#TableQuery[T]

    Permalink
    Attributes
    protected
  32. def toString(): String

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

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

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

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

Inherited from Repository[Id, E]

Inherited from AnyRef

Inherited from Any

Ungrouped