trait ExecutableStatement extends AnyRef
Represents an executable statement.
Executable statement is a statement that has all parameters provided and is ready to be executed.
- Alphabetic
- By Inheritance
- ExecutableStatement
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
execute()(implicit timeout: Timeout): Future[Unit]
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:
- UnauthorizedException when client is not authorized to perform the action
- InvalidQueryException when query is rejected by a database engine as invalid
- InactiveTxException when transaction is in progress but is in inactive state
- ConstraintViolationException when operation results in an integrity constraint violation
-
abstract
def
executeForFirstRow()(implicit timeout: Timeout): Future[Option[Row]]
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:
- UnauthorizedException when client is not authorized to perform the action
- InvalidQueryException when query is rejected by a database engine as invalid
- InactiveTxException when transaction is in progress but is in inactive state
- ConstraintViolationException when operation results in an integrity constraint violation
-
abstract
def
executeForRowsAffected()(implicit timeout: Timeout): Future[Long]
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:
- UnauthorizedException when client is not authorized to perform the action
- InvalidQueryException when query is rejected by a database engine as invalid
- InactiveTxException when transaction is in progress but is in inactive state
- ConstraintViolationException when operation results in an integrity constraint violation
-
abstract
def
executeForSet()(implicit timeout: Timeout): Future[ResultSet]
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:
- UnauthorizedException when client is not authorized to perform the action
- InvalidQueryException when query is rejected by a database engine as invalid
- InactiveTxException when transaction is in progress but is in inactive state
- ConstraintViolationException when operation results in an integrity constraint violation
-
abstract
def
executeForValue[A](valExtractor: (Row) ⇒ A)(implicit timeout: Timeout): Future[Option[A]]
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.
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:
- UnauthorizedException when client is not authorized to perform the action
- InvalidQueryException when query is rejected by a database engine as invalid
- InactiveTxException when transaction is in progress but is in inactive state
- ConstraintViolationException when operation results in an integrity constraint violation
- valExtractor
function used to extract value from the returned row
-
abstract
def
stream()(implicit timeout: Timeout): RowPublisher
Returns a RowPublisher instance that can be used to stream rows from the database leveraging Reactive Streams specification's
Publisher
with backpressure.Returns a RowPublisher instance that can be used to stream rows from the database leveraging Reactive Streams specification's
Publisher
with backpressure.The statement is not executed until the stream is subscribed to.
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.This method doesn't throw exceptions on failures. Failures are reported by the returned publisher.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from ExecutableStatement to any2stringadd[ExecutableStatement] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
->[B](y: B): (ExecutableStatement, B)
- Implicit
- 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()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
def
ensuring(cond: (ExecutableStatement) ⇒ Boolean, msg: ⇒ Any): ExecutableStatement
- Implicit
- This member is added by an implicit conversion from ExecutableStatement to Ensuring[ExecutableStatement] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (ExecutableStatement) ⇒ Boolean): ExecutableStatement
- Implicit
- This member is added by an implicit conversion from ExecutableStatement to Ensuring[ExecutableStatement] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): ExecutableStatement
- Implicit
- This member is added by an implicit conversion from ExecutableStatement to Ensuring[ExecutableStatement] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): ExecutableStatement
- Implicit
- This member is added by an implicit conversion from ExecutableStatement to Ensuring[ExecutableStatement] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
abstract
def
executeForKey[K]()(implicit arg0: ClassTag[K], timeout: Timeout): Future[K]
[use case] Executes this statement and returns a single generated key.
[use case]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:
- UnauthorizedException when client is not authorized to perform the action
- InvalidQueryException when query is rejected by a database engine as invalid
- InactiveTxException when transaction is in progress but is in inactive state
- ConstraintViolationException when operation results in an integrity constraint violation
- NoKeysReturnedException when no keys were returned by the database engine
- NoSuitableConverterFoundException when no suitable converter was found to transform key value to desired class instance
- K
type of the returned key
-
def
formatted(fmtstr: String): String
- Implicit
- 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()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
→[B](y: B): (ExecutableStatement, B)
- Implicit
- This member is added by an implicit conversion from ExecutableStatement to ArrowAssoc[ExecutableStatement] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
TODO