Impl

scalasql.core.DbApi.Impl
class Impl(connection: Connection, config: Config, dialect: DialectConfig, defaultListeners: Iterable[TransactionListener], autoCommit: Boolean) extends Txn

Attributes

Graph
Supertypes
trait Txn
trait DbApi
trait AutoCloseable
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def addTransactionListener(listener: TransactionListener): Unit

Attributes

Definition Classes
Txn
def close(): Unit
def configureRunCloseStatement[P <: Statement, T](statement: P, fetchSize: Int, queryTimeoutSeconds: Int, sql: String, fileName: FileName, lineNum: Line)(f: P => T): T
def renderSql[Q, R](query: Q, castParams: Boolean)(implicit qr: Queryable[Q, R]): String

Converts the given query Q into a string. Useful for debugging and logging

Converts the given query Q into a string. Useful for debugging and logging

Attributes

def rollback(): Unit

Rolls back any active Savepoints and then rolls back this Transaction

Rolls back any active Savepoints and then rolls back this Transaction

Attributes

def rollbackSavepoint(savepoint: Savepoint): Unit | ArrayDeque[Savepoint]
def run[Q, R](query: Q, fetchSize: Int, queryTimeoutSeconds: Int)(implicit qr: Queryable[Q, R], fileName: FileName, lineNum: Line): R

Runs the given query Q and returns a value of type R

Runs the given query Q and returns a value of type R

Attributes

def runRaw[R](sql: String, variables: Seq[Any], fetchSize: Int, queryTimeoutSeconds: Int)(implicit qr: Row[_, R], fileName: FileName, lineNum: Line): IndexedSeq[R]

Runs a java.lang.String (and any interpolated variables) and deserializes the result set into a Seq of the given type R

Runs a java.lang.String (and any interpolated variables) and deserializes the result set into a Seq of the given type R

Attributes

def runRawUpdate0(sql: String, variables: Seq[(PreparedStatement, Int) => Unit], fetchSize: Int, queryTimeoutSeconds: Int, fileName: FileName, lineNum: Line): Int
def runRawUpdateGetGeneratedKeys0[R](sql: String, variables: Seq[(PreparedStatement, Int) => Unit], fetchSize: Int, queryTimeoutSeconds: Int, fileName: FileName, lineNum: Line, qr: Row[_, R]): IndexedSeq[R]
def runSql[R](sql: SqlStr, fetchSize: Int, queryTimeoutSeconds: Int)(implicit qr: Row[_, R], fileName: FileName, lineNum: Line): IndexedSeq[R]

Runs the given SqlStr of the form sql"..." and returns a value of type R

Runs the given SqlStr of the form sql"..." and returns a value of type R

Attributes

def savepoint[T](block: Savepoint => T): T

Creates a SQL Savepoint that is active within the given block; automatically releases the savepoint if the block completes successfully and rolls it back if the block terminates with an exception, and allows you to roll back the savepoint manually via the DbApi.Savepoint parameter passed to that block

Creates a SQL Savepoint that is active within the given block; automatically releases the savepoint if the block completes successfully and rolls it back if the block terminates with an exception, and allows you to roll back the savepoint manually via the DbApi.Savepoint parameter passed to that block

Attributes

def stream[Q, R](query: Q, fetchSize: Int, queryTimeoutSeconds: Int)(implicit qr: Queryable[Q, Seq[R]], fileName: FileName, lineNum: Line): Generator[R]

Runs the given query Q and returns a Generator of values of type R. allow you to process the results in a streaming fashion without materializing the entire list of results in memory

Runs the given query Q and returns a Generator of values of type R. allow you to process the results in a streaming fashion without materializing the entire list of results in memory

Attributes

def streamFlattened0[R](construct: ResultSetIterator => R, flattened: Flattened, fetchSize: Int, queryTimeoutSeconds: Int, fileName: FileName, lineNum: Line): Generator[R]
def streamRaw[R](sql: String, variables: Seq[Any], fetchSize: Int, queryTimeoutSeconds: Int)(implicit qr: Row[_, R], fileName: FileName, lineNum: Line): Generator[R]

Runs a java.lang.String (and any interpolated variables) and deserializes the result set into a streaming Generator of the given type R

Runs a java.lang.String (and any interpolated variables) and deserializes the result set into a streaming Generator of the given type R

Attributes

def streamRaw0[R](construct: ResultSetIterator => R, sql: String, variables: Seq[(PreparedStatement, Int) => Unit], fetchSize: Int, queryTimeoutSeconds: Int, fileName: FileName, lineNum: Line): Generator[R]
def streamSql[R](sql: SqlStr, fetchSize: Int, queryTimeoutSeconds: Int)(implicit qr: Row[_, R], fileName: FileName, lineNum: Line): Generator[R]

A combination of stream and runSql, streamSql allows you to pass in an arbitrary SqlStr of the form sql"..." and streams the results back to you

A combination of stream and runSql, streamSql allows you to pass in an arbitrary SqlStr of the form sql"..." and streams the results back to you

Attributes

def updateGetGeneratedKeysRaw[R](sql: String, variables: Seq[Any], fetchSize: Int, queryTimeoutSeconds: Int)(implicit qr: Row[_, R], fileName: FileName, lineNum: Line): IndexedSeq[R]
def updateGetGeneratedKeysSql[R](sql: SqlStr, fetchSize: Int, queryTimeoutSeconds: Int)(implicit qr: Row[_, R], fileName: FileName, lineNum: Line): IndexedSeq[R]
def updateRaw(sql: String, variables: Seq[Any], fetchSize: Int, queryTimeoutSeconds: Int)(implicit fileName: FileName, lineNum: Line): Int

Runs an java.lang.String (and any interpolated variables) containing an UPDATE or INSERT query and returns the number of rows affected

Runs an java.lang.String (and any interpolated variables) containing an UPDATE or INSERT query and returns the number of rows affected

Attributes

def updateSql(sql: SqlStr, fetchSize: Int, queryTimeoutSeconds: Int)(implicit fileName: FileName, lineNum: Line): Int

Runs an SqlStr of the form sql"..." containing an UPDATE or INSERT query and returns the number of rows affected

Runs an SqlStr of the form sql"..." containing an UPDATE or INSERT query and returns the number of rows affected

Attributes

Concrete fields

val listeners: ArrayDeque[TransactionListener]
val savepointStack: ArrayDeque[Savepoint]