case class ReadOnlyNamedAutoSession(name: Any, settings: SettingsProvider = SettingsProvider.default) extends DBSession with Product with Serializable
Represents that already existing session will be used or a new read-only session which is retrieved from named connection pool will be started.
- Alphabetic
- By Inheritance
- ReadOnlyNamedAutoSession
- Serializable
- Product
- Equals
- DBSession
- AutoCloseable
- LoanPattern
- LogSupport
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ReadOnlyNamedAutoSession(name: Any, settings: SettingsProvider = SettingsProvider.default)
Type Members
- type Closable = AnyRef { def close(): Unit }
- Definition Classes
- LoanPattern
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def batch[C[_]](template: String, paramsList: Seq[Any]*)(implicit f: Factory[Int, C[Int]]): C[Int]
Executes java.sql.PreparedStatement#executeBatch().
Executes java.sql.PreparedStatement#executeBatch().
- template
SQL template
- paramsList
list of parameters
- returns
count list
- Definition Classes
- DBSession
- def batchAndReturnGeneratedKey[C[_]](template: String, paramsList: Seq[Any]*)(implicit f: Factory[Long, C[Long]]): C[Long]
Executes java.sql.PreparedStatement#executeBatch() and returns numeric generated keys.
Executes java.sql.PreparedStatement#executeBatch() and returns numeric generated keys.
- template
SQL template
- paramsList
list of parameters
- returns
generated keys
- Definition Classes
- DBSession
- def batchAndReturnSpecifiedGeneratedKey[C[_]](template: String, key: String, paramsList: Seq[Any]*)(implicit f: Factory[Long, C[Long]]): C[Long]
Executes java.sql.PreparedStatement#executeBatch() and returns numeric generated keys.
Executes java.sql.PreparedStatement#executeBatch() and returns numeric generated keys.
- template
SQL template
- key
generated key name
- paramsList
list of parameters
- returns
generated keys
- Definition Classes
- DBSession
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def close(): Unit
Close the connection.
Close the connection.
- Definition Classes
- DBSession → AutoCloseable
- def collection[A, C[_]](template: String, params: Any*)(extract: (WrappedResultSet) => A)(implicit f: Factory[A, C[A]]): C[A]
Returns query result as any Collection object.
Returns query result as any Collection object.
- A
return type
- C
return collection type
- template
SQL template
- params
parameters
- extract
extract function
- returns
result as C[A]
- Definition Classes
- DBSession
- lazy val connection: Connection
Connection
Connection
- Definition Classes
- DBSession
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def execute(template: String, params: Any*): Boolean
Executes java.sql.PreparedStatement#execute().
Executes java.sql.PreparedStatement#execute().
- template
SQL template
- params
parameters
- returns
flag
- Definition Classes
- DBSession
- def executeLargeUpdate(template: String, params: Any*): Long
Executes java.sql.PreparedStatement#executeLargeUpdate().
Executes java.sql.PreparedStatement#executeLargeUpdate().
- template
SQL template
- params
parameters
- returns
result count
- Definition Classes
- DBSession
- def executeUpdate(template: String, params: Any*): Int
Executes java.sql.PreparedStatement#executeUpdate().
Executes java.sql.PreparedStatement#executeUpdate().
- template
SQL template
- params
parameters
- returns
result count
- Definition Classes
- DBSession
- def executeWithFilters(before: (PreparedStatement) => Unit, after: (PreparedStatement) => Unit, template: String, params: Any*): Boolean
Executes java.sql.PreparedStatement#execute().
Executes java.sql.PreparedStatement#execute().
- before
before filter
- after
after filter
- template
SQL template
- params
parameters
- returns
flag
- Definition Classes
- DBSession
- def fetchSize(fetchSize: Option[Int]): ReadOnlyNamedAutoSession.this.type
- Definition Classes
- ReadOnlyNamedAutoSession → DBSession
- def fetchSize(fetchSize: Int): ReadOnlyNamedAutoSession.this.type
Set fetchSize for this session.
Set fetchSize for this session.
- fetchSize
fetch size
- returns
this
- Definition Classes
- ReadOnlyNamedAutoSession → DBSession
- def fetchSize: Option[Int]
Returns fetchSize for this session.
- def first[A](template: String, params: Any*)(extract: (WrappedResultSet) => A): Option[A]
Returns the first row optionally.
Returns the first row optionally.
- A
return type
- template
SQL template
- params
parameters
- extract
extract function
- returns
result optionally
- Definition Classes
- DBSession
- def foldLeft[A](template: String, params: Any*)(z: A)(op: (A, WrappedResultSet) => A): A
folding into one value.
folding into one value.
- template
SQL template
- params
parameters
- z
initial value
- op
function
- returns
folded value
- Definition Classes
- DBSession
- def foreach(template: String, params: Any*)(f: (WrappedResultSet) => Unit): Unit
Applies side-effect to each row iteratively.
Applies side-effect to each row iteratively.
- template
SQL template
- params
parameters
- f
function
- returns
result as list
- Definition Classes
- DBSession
- def futureUsing[R <: Closable, A](resource: R)(f: (R) => Future[A])(implicit ec: ExecutionContext): Future[A]
Guarantees a Closeable resource will be closed after being passed to a block that takes the resource as a parameter and returns a Future.
Guarantees a Closeable resource will be closed after being passed to a block that takes the resource as a parameter and returns a Future.
- Definition Classes
- LoanPattern
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val isReadOnly: Boolean
is read-only session
is read-only session
- Definition Classes
- ReadOnlyNamedAutoSession → DBSession
- def iterable[A](template: String, params: Any*)(extract: (WrappedResultSet) => A): Iterable[A]
Returns query result as scala.collection.Iterable object.
Returns query result as scala.collection.Iterable object.
- A
return type
- template
SQL template
- params
parameters
- extract
extract function
- returns
result as iterable
- Definition Classes
- DBSession
- def largeBatch[C[_]](template: String, paramsList: Seq[Any]*)(implicit f: Factory[Long, C[Long]]): C[Long]
Executes java.sql.PreparedStatement#executeLargeBatch().
Executes java.sql.PreparedStatement#executeLargeBatch().
- template
SQL template
- paramsList
list of parameters
- returns
count list
- Definition Classes
- DBSession
- def largeUpdateWithAutoGeneratedKeyNameAndFilters(returnGeneratedKeys: Boolean, generatedKeyName: String, before: (PreparedStatement) => Unit, after: (PreparedStatement) => Unit, template: String, params: Any*): Long
Executes java.sql.PreparedStatement#executeLargeUpdate().
Executes java.sql.PreparedStatement#executeLargeUpdate().
- returnGeneratedKeys
is generated keys required
- generatedKeyName
generated key name
- before
before filter
- after
after filter
- template
SQL template
- params
parameters
- returns
result count
- Definition Classes
- DBSession
- def largeUpdateWithFilters(returnGeneratedKeys: Boolean, before: (PreparedStatement) => Unit, after: (PreparedStatement) => Unit, template: String, params: Any*): Long
Executes java.sql.PreparedStatement#executeLargeUpdate().
Executes java.sql.PreparedStatement#executeLargeUpdate().
- returnGeneratedKeys
is generated keys required
- before
before filter
- after
after filter
- template
SQL template
- params
parameters
- returns
result count
- Definition Classes
- DBSession
- def largeUpdateWithFilters(before: (PreparedStatement) => Unit, after: (PreparedStatement) => Unit, template: String, params: Any*): Long
Executes java.sql.PreparedStatement#executeLargeUpdate().
Executes java.sql.PreparedStatement#executeLargeUpdate().
- before
before filter
- after
after filter
- template
SQL template
- params
parameters
- returns
result count
- Definition Classes
- DBSession
- def list[A](template: String, params: Any*)(extract: (WrappedResultSet) => A): List[A]
Returns query result as scala.List object.
Returns query result as scala.List object.
- A
return type
- template
SQL template
- params
parameters
- extract
extract function
- returns
result as list
- Definition Classes
- DBSession
- val log: Log
Logger
Logger
- Attributes
- protected
- Definition Classes
- LogSupport
- val name: Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def queryTimeout(seconds: Option[Int]): ReadOnlyNamedAutoSession.this.type
- Definition Classes
- ReadOnlyNamedAutoSession → DBSession
- def queryTimeout(seconds: Int): ReadOnlyNamedAutoSession.this.type
Set queryTimeout to this session.
Set queryTimeout to this session.
- seconds
query timeout seconds
- returns
this
- Definition Classes
- ReadOnlyNamedAutoSession → DBSession
- def queryTimeout: Option[Int]
Returns queryTimeout for this session.
- val settings: SettingsProvider
- Definition Classes
- ReadOnlyNamedAutoSession → DBSession
- def single[A](template: String, params: Any*)(extract: (WrappedResultSet) => A): Option[A]
Returns single result optionally.
Returns single result optionally. If the result is not single, scalikejdbc.TooManyRowsException will be thrown.
- A
return type
- template
SQL template
- params
parameters
- extract
extract function
- returns
result optionally
- Definition Classes
- DBSession
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tags(tags: String*): ReadOnlyNamedAutoSession.this.type
Set tags to this session.
- def tags: Seq[String]
Returns tags for this session.
- def toBatchStatementExecutor(template: String): StatementExecutor
- Definition Classes
- DBSession
- def toStatementExecutor(template: String, params: Seq[Any], returnGeneratedKeys: Boolean = false): StatementExecutor
- Definition Classes
- DBSession
- val tx: Option[Tx]
Returns current transaction if exists.
Returns current transaction if exists.
- Definition Classes
- ReadOnlyNamedAutoSession → DBSession
- def unexpectedInvocation[A]: A
- Attributes
- protected
- Definition Classes
- DBSession
- def update(template: String, params: Any*): Int
Executes java.sql.PreparedStatement#executeUpdate().
Executes java.sql.PreparedStatement#executeUpdate().
- template
SQL template
- params
parameters
- returns
result count
- Definition Classes
- DBSession
- def updateAndReturnGeneratedKey(template: String, params: Any*): Long
Executes java.sql.PreparedStatement#executeUpdate() and returns the generated key.
Executes java.sql.PreparedStatement#executeUpdate() and returns the generated key.
- template
SQL template
- params
parameters
- returns
generated key as a long value
- Definition Classes
- DBSession
- def updateAndReturnSpecifiedGeneratedKey(template: String, params: Any*)(key: Any): Long
Executes java.sql.PreparedStatement#executeUpdate() and returns the generated key.
Executes java.sql.PreparedStatement#executeUpdate() and returns the generated key.
- template
SQL template
- params
parameters
- key
name
- returns
generated key as a long value
- Definition Classes
- DBSession
- def updateWithAutoGeneratedKeyNameAndFilters(returnGeneratedKeys: Boolean, generatedKeyName: String, before: (PreparedStatement) => Unit, after: (PreparedStatement) => Unit, template: String, params: Any*): Int
Executes java.sql.PreparedStatement#executeUpdate().
Executes java.sql.PreparedStatement#executeUpdate().
- returnGeneratedKeys
is generated keys required
- generatedKeyName
generated key name
- before
before filter
- after
after filter
- template
SQL template
- params
parameters
- returns
result count
- Definition Classes
- DBSession
- def updateWithFilters(returnGeneratedKeys: Boolean, before: (PreparedStatement) => Unit, after: (PreparedStatement) => Unit, template: String, params: Any*): Int
Executes java.sql.PreparedStatement#executeUpdate().
Executes java.sql.PreparedStatement#executeUpdate().
- returnGeneratedKeys
is generated keys required
- before
before filter
- after
after filter
- template
SQL template
- params
parameters
- returns
result count
- Definition Classes
- DBSession
- def updateWithFilters(before: (PreparedStatement) => Unit, after: (PreparedStatement) => Unit, template: String, params: Any*): Int
Executes java.sql.PreparedStatement#executeUpdate().
Executes java.sql.PreparedStatement#executeUpdate().
- before
before filter
- after
after filter
- template
SQL template
- params
parameters
- returns
result count
- Definition Classes
- DBSession
- def using[R <: Closable, A](resource: R)(f: (R) => A): A
- Definition Classes
- LoanPattern
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)