Packages

c

scalikejdbc

ReadOnlyNamedAutoSession

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.

Source
ReadOnlyAutoSession.scala
Linear Supertypes
Serializable, Product, Equals, DBSession, AutoCloseable, LoanPattern, LogSupport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReadOnlyNamedAutoSession
  2. Serializable
  3. Product
  4. Equals
  5. DBSession
  6. AutoCloseable
  7. LoanPattern
  8. LogSupport
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ReadOnlyNamedAutoSession(name: Any, settings: SettingsProvider = SettingsProvider.default)

Type Members

  1. type Closable = AnyRef { def close(): Unit }
    Definition Classes
    LoanPattern

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. 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
  6. 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
  7. 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
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  9. def close(): Unit

    Close the connection.

    Close the connection.

    Definition Classes
    DBSession → AutoCloseable
  10. 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
  11. lazy val connection: Connection

    Connection

    Connection

    Definition Classes
    DBSession
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. 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
  14. 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
  15. 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
  16. 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
  17. def fetchSize(fetchSize: Option[Int]): ReadOnlyNamedAutoSession.this.type
    Definition Classes
    ReadOnlyNamedAutoSessionDBSession
  18. def fetchSize(fetchSize: Int): ReadOnlyNamedAutoSession.this.type

    Set fetchSize for this session.

    Set fetchSize for this session.

    fetchSize

    fetch size

    returns

    this

    Definition Classes
    ReadOnlyNamedAutoSessionDBSession
  19. def fetchSize: Option[Int]

    Returns fetchSize for this session.

    Returns fetchSize for this session.

    returns

    fetch size

    Definition Classes
    DBSession
  20. 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
  21. 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
  22. 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
  23. 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
  24. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. val isReadOnly: Boolean

    is read-only session

    is read-only session

    Definition Classes
    ReadOnlyNamedAutoSessionDBSession
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. val log: Log

    Logger

    Logger

    Attributes
    protected
    Definition Classes
    LogSupport
  34. val name: Any
  35. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  37. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  38. def productElementNames: Iterator[String]
    Definition Classes
    Product
  39. def queryTimeout(seconds: Option[Int]): ReadOnlyNamedAutoSession.this.type
    Definition Classes
    ReadOnlyNamedAutoSessionDBSession
  40. 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
    ReadOnlyNamedAutoSessionDBSession
  41. def queryTimeout: Option[Int]

    Returns queryTimeout for this session.

    Returns queryTimeout for this session.

    returns

    query timeout seconds

    Definition Classes
    DBSession
  42. val settings: SettingsProvider
    Definition Classes
    ReadOnlyNamedAutoSessionDBSession
  43. 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
  44. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  45. def tags(tags: String*): ReadOnlyNamedAutoSession.this.type

    Set tags to this session.

    Set tags to this session.

    tags

    tags

    returns

    this

    Definition Classes
    ReadOnlyNamedAutoSessionDBSession
  46. def tags: Seq[String]

    Returns tags for this session.

    Returns tags for this session.

    returns

    tags

    Definition Classes
    DBSession
  47. def toBatchStatementExecutor(template: String): StatementExecutor
    Definition Classes
    DBSession
  48. def toStatementExecutor(template: String, params: Seq[Any], returnGeneratedKeys: Boolean = false): StatementExecutor
    Definition Classes
    DBSession
  49. val tx: Option[Tx]

    Returns current transaction if exists.

    Returns current transaction if exists.

    Definition Classes
    ReadOnlyNamedAutoSessionDBSession
  50. def unexpectedInvocation[A]: A
    Attributes
    protected
    Definition Classes
    DBSession
  51. 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
  52. 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
  53. 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
  54. 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
  55. 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
  56. 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
  57. def using[R <: Closable, A](resource: R)(f: (R) => A): A
    Definition Classes
    LoanPattern
  58. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  59. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  60. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from DBSession

Inherited from AutoCloseable

Inherited from LoanPattern

Inherited from LogSupport

Inherited from AnyRef

Inherited from Any

Ungrouped