Trait

io.rdbc.sapi

ExecutableStatement

Related Doc: package sapi

Permalink

trait ExecutableStatement extends AnyRef

Represents an executable statement.

Executable statement is a statement that has all parameters provided and is ready to be executed.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ExecutableStatement
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def execute()(implicit timeout: Timeout): Future[Unit]

    Permalink

    Executes this statement ignoring any resulting information.

    Executes this statement ignoring any resulting information.

    After the operation takes longer time than timeout, operation will be aborted. Note however, that it may not be feasible to abort the operation immediately.

    Returned future can fail with:

  2. abstract def executeForFirstRow()(implicit timeout: Timeout): Future[Option[Row]]

    Permalink

    Executes this statement and returns the first row returned by a database engine.

    Executes this statement and returns the first row returned by a database engine.

    If no rows are found, None will be returned.

    After the operation takes longer time than timeout, operation will be aborted. Note however, that it may not be feasible to abort the operation immediately.

    Returned future can fail with:

  3. abstract def executeForKey[K]()(implicit arg0: ClassTag[K], timeout: Timeout): Future[K]

    Permalink

    Executes this statement and returns a single generated key.

    Executes this statement and returns a single generated key.

    After the operation takes longer time than timeout, operation will be aborted. Note however, that it may not be feasible to abort the operation immediately.

    Returned future can fail with:

    K

    type of the returned key

  4. abstract def executeForRowsAffected()(implicit timeout: Timeout): Future[Long]

    Permalink

    Executes this statement returning a number of rows that were affected.

    Executes this statement returning a number of rows that were affected.

    After the operation takes longer time than timeout, operation will be aborted. Note however, that it may not be feasible to abort the operation immediately.

    Returned future can fail with:

  5. abstract def executeForSet()(implicit timeout: Timeout): Future[ResultSet]

    Permalink

    Executes this statement and returns a ResultSet instance.

    Executes this statement and returns a ResultSet instance.

    After execution all resulting rows will be pulled from a database and buffered in the resulting object. If expected result set is very big this may cause out of memory errors.

    After the operation takes longer time than timeout, operation will be aborted. Note however, that it may not be feasible to abort the operation immediately.

    Returned future can fail with:

  6. abstract def executeForStream()(implicit timeout: Timeout): Future[ResultStream]

    Permalink

    Executes this statement and returns a ResultStream instance that can be used to stream rows from the database leveraging Reactive Streams specification's Publisher with backpressure.

    Executes this statement and returns a ResultStream instance that can be used to stream rows from the database leveraging Reactive Streams specification's Publisher with backpressure.

    After the operation takes longer time than timeout, operation will be aborted. Note however, that it may not be feasible to abort the operation immediately.

    Returned future can fail with:

  7. abstract def executeForValue[A](valExtractor: (Row) ⇒ A)(implicit timeout: Timeout): Future[Option[A]]

    Permalink

    Executes this statement and returns a single column value from the first row returned by a database engine.

    Executes this statement and returns a single column value from the first row returned by a database engine.

    If no rows are found, None will be returned.

    If extracted value has SQL null value, a Some instance containing a null value will be returned.

    This method is not intended to be used for returning values from columns that can have a SQL null value. Use executeForValueOpt for such columns.

    Example:

    for {
      val id = 10
      select <- conn.statement(sql"select name from users where id = $id")
      name <- select.executeForValue(_.str("name"))
    } yield name

    After the operation takes longer time than timeout, operation will be aborted. Note however, that it may not be feasible to abort the operation immediately.

    Returned future can fail with:

    valExtractor

    function used to extract value from the returned row

  8. abstract def executeForValueOpt[A](valExtractor: (Row) ⇒ Option[A])(implicit timeout: Timeout): Future[Option[Option[A]]]

    Permalink

    Executes this statement and returns a single column value from the first row returned by a database engine.

    Executes this statement and returns a single column value from the first row returned by a database engine.

    If no rows are found, None will be returned.

    If row was found but extracted value has SQL null value, a Some instance will be returned containing a None.

    Example:

    val id = 10
    for {
      select <- conn.select(sql"select name from users where id = $id")
      name <- parametrized.executeForValueOpt(_.str("name"))
    } yield name

    After the operation takes longer time than timeout, operation will be aborted. Note however, that it may not be feasible to abort the operation immediately.

    Returned future can fail with:

    valExtractor

    function used to extract value from the returned row

Concrete Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from ExecutableStatement to any2stringadd[ExecutableStatement] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (ExecutableStatement, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from ExecutableStatement to ArrowAssoc[ExecutableStatement] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def ensuring(cond: (ExecutableStatement) ⇒ Boolean, msg: ⇒ Any): ExecutableStatement

    Permalink
    Implicit information
    This member is added by an implicit conversion from ExecutableStatement to Ensuring[ExecutableStatement] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (ExecutableStatement) ⇒ Boolean): ExecutableStatement

    Permalink
    Implicit information
    This member is added by an implicit conversion from ExecutableStatement to Ensuring[ExecutableStatement] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): ExecutableStatement

    Permalink
    Implicit information
    This member is added by an implicit conversion from ExecutableStatement to Ensuring[ExecutableStatement] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): ExecutableStatement

    Permalink
    Implicit information
    This member is added by an implicit conversion from ExecutableStatement to Ensuring[ExecutableStatement] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from ExecutableStatement to StringFormat[ExecutableStatement] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  16. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  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. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. def [B](y: B): (ExecutableStatement, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from ExecutableStatement to ArrowAssoc[ExecutableStatement] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from ExecutableStatement to any2stringadd[ExecutableStatement]

Inherited by implicit conversion StringFormat from ExecutableStatement to StringFormat[ExecutableStatement]

Inherited by implicit conversion Ensuring from ExecutableStatement to Ensuring[ExecutableStatement]

Inherited by implicit conversion ArrowAssoc from ExecutableStatement to ArrowAssoc[ExecutableStatement]

Ungrouped