SQLToOption

trait SQLToOption[A, E <: WithExtractor] extends SQLToResult[A, E, [A] =>> Option[A]]

SQL to Option

Type Params
A

return type

E

extractor settings

trait SQLToResult[A, E, [A] =>> Option[A]]
class SQL[A, E]
trait Extractor[A]
class Object
trait Matchable
class Any
class OneToManies10SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, E, Z]
class OneToManies11SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, E, Z]
class OneToManies12SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, E, Z]
class OneToManies13SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, E, Z]
class OneToManies14SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, E, Z]
class OneToManies15SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, E, Z]
class OneToManies16SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, E, Z]
class OneToManies17SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z]
class OneToManies18SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, E, Z]
class OneToManies19SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, E, Z]
class OneToManies20SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, E, Z]
class OneToManies21SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, B21, E, Z]
class OneToManies2SQLToOption[A, B1, B2, E, Z]
class OneToManies3SQLToOption[A, B1, B2, B3, E, Z]
class OneToManies4SQLToOption[A, B1, B2, B3, B4, E, Z]
class OneToManies5SQLToOption[A, B1, B2, B3, B4, B5, E, Z]
class OneToManies6SQLToOption[A, B1, B2, B3, B4, B5, B6, E, Z]
class OneToManies7SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, E, Z]
class OneToManies8SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, E, Z]
class OneToManies9SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, E, Z]
class OneToManySQLToOption[A, B, E, Z]
class OneToOneSQLToOption[A, B, E, Z]
class SQLToOptionImpl[A, E]

Type members

Inherited types

Inherited from
SQL
type ThisSQL = SQL[A, E]
Inherited from
SQL

Value members

Abstract methods

protected def isSingle: Boolean

Concrete methods

def result[AA](f: WrappedResultSet => AA, session: DBSession): Option[AA]

Inherited methods

def apply(implicit session: DBSession, context: ConnectionPoolContext, hasExtractor: ThisSQL =:= SQLWithExtractor): Option[A]
Inherited from
SQLToResult
def batch(parameters: Seq[Any]*): SQLBatch

Binds parameters for batch

Binds parameters for batch

Value Params
parameters

parameters

Returns

SQL for batch

Inherited from
SQL
def batchAndReturnGeneratedKey(generatedKeyName: String, parameters: Seq[Any]*): SQLBatchWithGeneratedKey

Binds parameters for batch

Binds parameters for batch

Value Params
generatedKeyName

generated key name

parameters

parameters

Returns

SQL for batch

Inherited from
SQL

Binds parameters for batch

Binds parameters for batch

Value Params
parameters

parameters

Returns

SQL for batch

Inherited from
SQL
def batchByName(parameters: Seq[(String, Any)]*): SQLBatch

Binds parameters for batch

Binds parameters for batch

Value Params
parameters

parameters

Returns

SQL for batch

Inherited from
SQL
def bind(parameters: Any*): SQL[A, E]

Binds parameters to SQL template in order.

Binds parameters to SQL template in order.

Value Params
parameters

parameters

Returns

SQL instance

Inherited from
SQL
def bindByName(parametersByName: (String, Any)*): SQL[A, E]

Binds named parameters to SQL template.

Binds named parameters to SQL template.

Value Params
parametersByName

named parameters

Returns

SQL instance

Inherited from
SQL

Set execution type as collection.

Set execution type as collection.

Returns

SQL instance

Inherited from
SQL
Inherited from
SQL

Set execution type as execute

Set execution type as execute

Returns

SQL instance

Inherited from
SQL

Set execution type as executeUpdate

Set execution type as executeUpdate

Returns

SQL instance

Inherited from
SQL
def executeUpdateWithFilters(before: PreparedStatement => Unit, after: PreparedStatement => Unit): SQLUpdate

Set execution type as executeUpdate with filters

Set execution type as executeUpdate with filters

Value Params
after

after filter

before

before filter

Returns

SQL instance

Inherited from
SQL
def executeWithFilters(before: PreparedStatement => Unit, after: PreparedStatement => Unit): SQLExecution

Set execution type as execute with filters

Set execution type as execute with filters

Value Params
after

after filter

before

before filter

Returns

SQL instance

Inherited from
SQL
override def extractor: WrappedResultSet => A
Definition Classes
SQL -> Extractor
Inherited from
SQL
def fetchSize: Option[Int]

Returns fetchSize for this query.

Returns fetchSize for this query.

Returns

fetch size

Inherited from
SQL
def fetchSize(fetchSize: Option[Int]): SQLToOption[A, E]
Inherited from
SQL
def fetchSize(fetchSize: Int): SQLToOption[A, E]

Set fetchSize for this query.

Set fetchSize for this query.

Value Params
fetchSize

fetch size

Returns

this

Inherited from
SQL
def first: SQLToOption[A, E]

Set execution type as first.

Set execution type as first.

Returns

SQL instance

Inherited from
SQL
def foldLeft[A](z: A)(op: (A, WrappedResultSet) => A)(implicit session: DBSession): A

folding into one value

folding into one value

Value Params
op

operation

z

initial value

Inherited from
SQL
def foreach(op: WrappedResultSet => Unit)(implicit session: DBSession): Unit

Apply the operation to all elements of result set

Apply the operation to all elements of result set

Value Params
op

operation

Inherited from
SQL

Same as #first.

Same as #first.

Returns

SQL instance

Inherited from
SQL

Set execution type as iterable.

Set execution type as iterable.

Returns

SQL instance

Inherited from
SQL
def largeBatch(parameters: Seq[Any]*): SQLLargeBatch

Binds parameters for largeBatch

Binds parameters for largeBatch

Value Params
parameters

parameters

Returns

SQL for batch

Inherited from
SQL

Set execution type as executeLargeUpdate

Set execution type as executeLargeUpdate

Returns

SQL instance

Inherited from
SQL
def largeUpdateWithFilters(before: PreparedStatement => Unit, after: PreparedStatement => Unit): SQLLargeUpdate

Set execution type as executeLargeUpdate with filters

Set execution type as executeLargeUpdate with filters

Value Params
after

after filter

before

before filter

Returns

SQL instance

Inherited from
SQL
def list: SQLToList[A, E]

Set execution type as list.

Set execution type as list.

Returns

SQL instance

Inherited from
SQL
def map[A](f: WrappedResultSet => A): SQL[A, HasExtractor]

Maps values from each scalikejdbc.WrappedResultSet object.

Maps values from each scalikejdbc.WrappedResultSet object.

Type Params
A

return type

Value Params
f

extractor function

Returns

SQL instance

Inherited from
SQL
def one[Z](f: WrappedResultSet => A): OneToXSQL[A, E, Z]

Returns One-to-X API builder.

Returns One-to-X API builder.

Inherited from
SQL
def queryTimeout: Option[Int]

Returns queryTimeout for this query.

Returns queryTimeout for this query.

Returns

query timeout seconds

Inherited from
SQL
def queryTimeout(seconds: Option[Int]): SQLToOption[A, E]
Inherited from
SQL
def queryTimeout(seconds: Int): SQLToOption[A, E]

Set queryTimeout for this query.

Set queryTimeout for this query.

Value Params
seconds

query timeout seconds

Returns

this

Inherited from
SQL
def single: SQLToOption[A, E]

Set execution type as single.

Set execution type as single.

Returns

SQL instance

Inherited from
SQL
def stripMargin: SQL[A, E]
Inherited from
SQL
def stripMargin(marginChar: Char): SQL[A, E]
Inherited from
SQL
def tags: Seq[String]

Returns tags for this SQL object.

Returns tags for this SQL object.

Returns

tags

Inherited from
SQL
def tags(tags: String*): SQLToOption[A, E]

Appends tags to this SQL object.

Appends tags to this SQL object.

Value Params
tags

tags

Returns

this

Inherited from
SQL

Same as #collection

Same as #collection

Returns

SQL instance

Inherited from
SQL

Same as #iterable.

Same as #iterable.

Returns

SQL instance

Inherited from
SQL
def toList: SQLToList[A, E]

Same as #list

Same as #list

Returns

SQL instance

Inherited from
SQL
def toMap: SQL[Map[String, Any], HasExtractor]

Maps values as a Map value from each scalikejdbc.WrappedResultSet object.

Maps values as a Map value from each scalikejdbc.WrappedResultSet object.

Returns

SQL instance

Inherited from
SQL
def toOption: SQLToOption[A, E]

Same as #single.

Same as #single.

Returns

SQL instance

Inherited from
SQL

Set execution type as executeUpdate

Set execution type as executeUpdate

Returns

SQL instance

Inherited from
SQL

Set execution type as updateAndReturnGeneratedKey

Set execution type as updateAndReturnGeneratedKey

Returns

SQL instance

Inherited from
SQL
def updateWithFilters(before: PreparedStatement => Unit, after: PreparedStatement => Unit): SQLUpdate

Set execution type as executeUpdate with filters

Set execution type as executeUpdate with filters

Value Params
after

after filter

before

before filter

Returns

SQL instance

Inherited from
SQL

Inherited fields

final lazy val parameters: Seq[Any]
Inherited from
SQL
val statement: String
Inherited from
SQL