SQL

abstract class SQL[A, E <: WithExtractor](val statement: String, val rawParameters: Seq[Any])(f: WrappedResultSet => A) extends Extractor[A]

SQL abstraction.

Type Params
A

return type

Value Params
f

extractor function

rawParameters

parameters

statement

SQL template

Companion
object
trait Extractor[A]
class Object
trait Matchable
class Any
class OneToManies10SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, E, Z]
class OneToManies10SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, E, Z]
class OneToManies10SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, E, Z]
class OneToManies10SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, E, Z]
class OneToManies10SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, E, Z]
class OneToManies11SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, E, Z]
class OneToManies11SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, E, Z]
class OneToManies11SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, E, Z]
class OneToManies11SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, E, Z]
class OneToManies11SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, E, Z]
class OneToManies12SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, E, Z]
class OneToManies12SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, E, Z]
class OneToManies12SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, E, Z]
class OneToManies12SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, E, Z]
class OneToManies12SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, E, Z]
class OneToManies13SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, E, Z]
class OneToManies13SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, E, Z]
class OneToManies13SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, E, Z]
class OneToManies13SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, E, Z]
class OneToManies13SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, E, Z]
class OneToManies14SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, E, Z]
class OneToManies14SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, E, Z]
class OneToManies14SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, E, Z]
class OneToManies14SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, E, Z]
class OneToManies14SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, E, Z]
class OneToManies15SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, E, Z]
class OneToManies15SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, E, Z]
class OneToManies15SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, E, Z]
class OneToManies15SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, E, Z]
class OneToManies15SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, E, Z]
class OneToManies16SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, E, Z]
class OneToManies16SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, E, Z]
class OneToManies16SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, E, Z]
class OneToManies16SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, E, Z]
class OneToManies16SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, E, Z]
class OneToManies17SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z]
class OneToManies17SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z]
class OneToManies17SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, E, Z]
class OneToManies17SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, 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 OneToManies18SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, E, Z]
class OneToManies18SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, E, Z]
class OneToManies18SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, E, Z]
class OneToManies18SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, 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 OneToManies19SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, E, Z]
class OneToManies19SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, E, Z]
class OneToManies19SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, E, Z]
class OneToManies19SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, 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 OneToManies20SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, E, Z]
class OneToManies20SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, E, Z]
class OneToManies20SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, E, Z]
class OneToManies20SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, B15, B16, B17, B18, B19, B20, 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 OneToManies21SQL[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 OneToManies21SQLToCollection[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 OneToManies21SQLToIterable[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 OneToManies21SQLToList[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 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 OneToManies2SQL[A, B1, B2, E, Z]
class OneToManies2SQLToIterable[A, B1, B2, E, Z]
class OneToManies2SQLToOption[A, B1, B2, E, Z]
class OneToManies3SQL[A, B1, B2, B3, E, Z]
class OneToManies3SQLToCollection[A, B1, B2, B3, E, Z]
class OneToManies3SQLToIterable[A, B1, B2, B3, E, Z]
class OneToManies3SQLToList[A, B1, B2, B3, E, Z]
class OneToManies3SQLToOption[A, B1, B2, B3, E, Z]
class OneToManies4SQL[A, B1, B2, B3, B4, E, Z]
class OneToManies4SQLToCollection[A, B1, B2, B3, B4, E, Z]
class OneToManies4SQLToIterable[A, B1, B2, B3, B4, E, Z]
class OneToManies4SQLToList[A, B1, B2, B3, B4, E, Z]
class OneToManies4SQLToOption[A, B1, B2, B3, B4, E, Z]
class OneToManies5SQL[A, B1, B2, B3, B4, B5, E, Z]
class OneToManies5SQLToCollection[A, B1, B2, B3, B4, B5, E, Z]
class OneToManies5SQLToIterable[A, B1, B2, B3, B4, B5, E, Z]
class OneToManies5SQLToList[A, B1, B2, B3, B4, B5, E, Z]
class OneToManies5SQLToOption[A, B1, B2, B3, B4, B5, E, Z]
class OneToManies6SQL[A, B1, B2, B3, B4, B5, B6, E, Z]
class OneToManies6SQLToCollection[A, B1, B2, B3, B4, B5, B6, E, Z]
class OneToManies6SQLToIterable[A, B1, B2, B3, B4, B5, B6, E, Z]
class OneToManies6SQLToList[A, B1, B2, B3, B4, B5, B6, E, Z]
class OneToManies6SQLToOption[A, B1, B2, B3, B4, B5, B6, E, Z]
class OneToManies7SQL[A, B1, B2, B3, B4, B5, B6, B7, E, Z]
class OneToManies7SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, E, Z]
class OneToManies7SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, E, Z]
class OneToManies7SQLToList[A, B1, B2, B3, B4, B5, B6, B7, E, Z]
class OneToManies7SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, E, Z]
class OneToManies8SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, E, Z]
class OneToManies8SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, E, Z]
class OneToManies8SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, E, Z]
class OneToManies8SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, E, Z]
class OneToManies8SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, E, Z]
class OneToManies9SQL[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, E, Z]
class OneToManies9SQLToCollection[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, E, Z]
class OneToManies9SQLToIterable[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, E, Z]
class OneToManies9SQLToList[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, E, Z]
class OneToManies9SQLToOption[A, B1, B2, B3, B4, B5, B6, B7, B8, B9, E, Z]
class OneToManySQL[A, B, E, Z]
class OneToManySQLToCollection[A, B, E, Z]
class OneToManySQLToIterable[A, B, E, Z]
class OneToManySQLToList[A, B, E, Z]
class OneToManySQLToOption[A, B, E, Z]
class OneToOneSQL[A, B, E, Z]
class OneToOneSQLToCollection[A, B, E, Z]
class OneToOneSQLToIterable[A, B, E, Z]
class OneToOneSQLToList[A, B, E, Z]
class OneToOneSQLToOption[A, B, E, Z]
class OneToXSQL[A, E, Z]
class OneToManies2SQLToCollection[A, B1, B2, E, Z]
class OneToManies2SQLToList[A, B1, B2, E, Z]
trait SQLToCollection[A, E]
class SQLToIterableImpl[A, E]
class SQLToListImpl[A, E]
class SQLToOptionImpl[A, E]
trait SQLToResult[A, E, C]
trait SQLToIterable[A, E]
trait SQLToList[A, E]
trait SQLToOption[A, E]

Type members

Types

type ThisSQL = SQL[A, E]

Value members

Concrete methods

def batch(parameters: Seq[Any]*): SQLBatch

Binds parameters for batch

Binds parameters for batch

Value Params
parameters

parameters

Returns

SQL for batch

Binds parameters for batch

Binds parameters for batch

Value Params
parameters

parameters

Returns

SQL for batch

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

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

Binds parameters for batch

Binds parameters for batch

Value Params
parameters

parameters

Returns

SQL for batch

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

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

Set execution type as collection.

Set execution type as collection.

Returns

SQL instance

def dbSettingSettings(settings: SettingsProvider): SQL[A, E]

Set execution type as execute

Set execution type as execute

Returns

SQL instance

Set execution type as executeUpdate

Set execution type as executeUpdate

Returns

SQL instance

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

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

override def extractor: WrappedResultSet => A
Definition Classes
Extractor
def fetchSize(fetchSize: Int): SQL[A, E]

Set fetchSize for this query.

Set fetchSize for this query.

Value Params
fetchSize

fetch size

Returns

this

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

Returns fetchSize for this query.

Returns fetchSize for this query.

Returns

fetch size

def first: SQLToOption[A, E]

Set execution type as first.

Set execution type as first.

Returns

SQL instance

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

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

Same as #first.

Same as #first.

Returns

SQL instance

Set execution type as iterable.

Set execution type as iterable.

Returns

SQL instance

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

Binds parameters for largeBatch

Binds parameters for largeBatch

Value Params
parameters

parameters

Returns

SQL for batch

Set execution type as executeLargeUpdate

Set execution type as executeLargeUpdate

Returns

SQL instance

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

def list: SQLToList[A, E]

Set execution type as list.

Set execution type as list.

Returns

SQL instance

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

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

Returns One-to-X API builder.

Returns One-to-X API builder.

def queryTimeout(seconds: Int): SQL[A, E]

Set queryTimeout for this query.

Set queryTimeout for this query.

Value Params
seconds

query timeout seconds

Returns

this

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

Returns queryTimeout for this query.

Returns queryTimeout for this query.

Returns

query timeout seconds

def single: SQLToOption[A, E]

Set execution type as single.

Set execution type as single.

Returns

SQL instance

def stripMargin(marginChar: Char): SQL[A, E]
def stripMargin: SQL[A, E]
def tags(tags: String*): SQL[A, E]

Appends tags to this SQL object.

Appends tags to this SQL object.

Value Params
tags

tags

Returns

this

def tags: Seq[String]

Returns tags for this SQL object.

Returns tags for this SQL object.

Returns

tags

Same as #collection

Same as #collection

Returns

SQL instance

Same as #iterable.

Same as #iterable.

Returns

SQL instance

def toList: SQLToList[A, E]

Same as #list

Same as #list

Returns

SQL instance

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

def toOption: SQLToOption[A, E]

Same as #single.

Same as #single.

Returns

SQL instance

Set execution type as executeUpdate

Set execution type as executeUpdate

Returns

SQL instance

Set execution type as updateAndReturnGeneratedKey

Set execution type as updateAndReturnGeneratedKey

Returns

SQL instance

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

Concrete fields

final lazy val parameters: Seq[Any]
val statement: String