ActiveSession
Active session implementation of scalikejdbc.DBSession.
This class provides readOnly/autoCommit/localTx/withinTx blocks and session objects.
import scalikejdbc._
val userIdList = DB autoCommit { session: DBSession =>
session.list("select * from user") { rs => rs.int("id") }
}
- Value Params
- conn
connection
- isReadOnly
is read only
- tx
transaction
Type members
Inherited types
Value members
Inherited methods
Executes java.sql.PreparedStatement#executeBatch().
Executes java.sql.PreparedStatement#executeBatch().
- Value Params
- paramsList
list of parameters
- template
SQL template
- Returns
count list
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeBatch() and returns numeric generated keys.
Executes java.sql.PreparedStatement#executeBatch() and returns numeric generated keys.
- Value Params
- paramsList
list of parameters
- template
SQL template
- Returns
generated keys
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeBatch() and returns numeric generated keys.
Executes java.sql.PreparedStatement#executeBatch() and returns numeric generated keys.
- Value Params
- key
generated key name
- paramsList
list of parameters
- template
SQL template
- Returns
generated keys
- Inherited from
- DBSession
Returns query result as any Collection object.
Returns query result as any Collection object.
- Type Params
- A
return type
- C
return collection type
- Value Params
- extract
extract function
- params
parameters
- template
SQL template
- Returns
result as C[A]
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#execute().
Executes java.sql.PreparedStatement#execute().
- Value Params
- params
parameters
- template
SQL template
- Returns
flag
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeLargeUpdate().
Executes java.sql.PreparedStatement#executeLargeUpdate().
- Value Params
- params
parameters
- template
SQL template
- Returns
result count
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeUpdate().
Executes java.sql.PreparedStatement#executeUpdate().
- Value Params
- params
parameters
- template
SQL template
- Returns
result count
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#execute().
Executes java.sql.PreparedStatement#execute().
- Value Params
- after
after filter
- before
before filter
- params
parameters
- template
SQL template
- Returns
flag
- Inherited from
- DBSession
Returns fetchSize for this session.
Returns fetchSize for this session.
- Returns
fetch size
- Inherited from
- DBSession
Set fetchSize for this session.
Set fetchSize for this session.
- Value Params
- fetchSize
fetch size
- Returns
this
- Inherited from
- DBSession
Returns the first row optionally.
Returns the first row optionally.
- Type Params
- A
return type
- Value Params
- extract
extract function
- params
parameters
- template
SQL template
- Returns
result optionally
- Inherited from
- DBSession
folding into one value.
folding into one value.
- Value Params
- op
function
- params
parameters
- template
SQL template
- z
initial value
- Returns
folded value
- Inherited from
- DBSession
Applies side-effect to each row iteratively.
Applies side-effect to each row iteratively.
- Value Params
- f
function
- params
parameters
- template
SQL template
- Returns
result as list
- Inherited from
- DBSession
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.
- Inherited from
- LoanPattern
Returns query result as scala.collection.Iterable object.
Returns query result as scala.collection.Iterable object.
- Type Params
- A
return type
- Value Params
- extract
extract function
- params
parameters
- template
SQL template
- Returns
result as iterable
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeLargeBatch().
Executes java.sql.PreparedStatement#executeLargeBatch().
- Value Params
- paramsList
list of parameters
- template
SQL template
- Returns
count list
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeLargeUpdate().
Executes java.sql.PreparedStatement#executeLargeUpdate().
- Value Params
- after
after filter
- before
before filter
- generatedKeyName
generated key name
- params
parameters
- returnGeneratedKeys
is generated keys required
- template
SQL template
- Returns
result count
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeLargeUpdate().
Executes java.sql.PreparedStatement#executeLargeUpdate().
- Value Params
- after
after filter
- before
before filter
- params
parameters
- returnGeneratedKeys
is generated keys required
- template
SQL template
- Returns
result count
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeLargeUpdate().
Executes java.sql.PreparedStatement#executeLargeUpdate().
- Value Params
- after
after filter
- before
before filter
- params
parameters
- template
SQL template
- Returns
result count
- Inherited from
- DBSession
Returns query result as scala.List object.
Returns query result as scala.List object.
- Type Params
- A
return type
- Value Params
- extract
extract function
- params
parameters
- template
SQL template
- Returns
result as list
- Inherited from
- DBSession
Returns queryTimeout for this session.
Returns queryTimeout for this session.
- Returns
query timeout seconds
- Inherited from
- DBSession
Set queryTimeout to this session.
Set queryTimeout to this session.
- Value Params
- seconds
query timeout seconds
- Returns
this
- Inherited from
- DBSession
Returns single result optionally. If the result is not single, scalikejdbc.TooManyRowsException will be thrown.
Returns single result optionally. If the result is not single, scalikejdbc.TooManyRowsException will be thrown.
- Type Params
- A
return type
- Value Params
- extract
extract function
- params
parameters
- template
SQL template
- Returns
result optionally
- Inherited from
- DBSession
Set tags to this session.
Set tags to this session.
- Value Params
- tags
tags
- Returns
this
- Inherited from
- DBSession
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeUpdate().
Executes java.sql.PreparedStatement#executeUpdate().
- Value Params
- params
parameters
- template
SQL template
- Returns
result count
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeUpdate() and returns the generated key.
Executes java.sql.PreparedStatement#executeUpdate() and returns the generated key.
- Value Params
- params
parameters
- template
SQL template
- Returns
generated key as a long value
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeUpdate() and returns the generated key.
Executes java.sql.PreparedStatement#executeUpdate() and returns the generated key.
- Value Params
- key
name
- params
parameters
- template
SQL template
- Returns
generated key as a long value
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeUpdate().
Executes java.sql.PreparedStatement#executeUpdate().
- Value Params
- after
after filter
- before
before filter
- generatedKeyName
generated key name
- params
parameters
- returnGeneratedKeys
is generated keys required
- template
SQL template
- Returns
result count
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeUpdate().
Executes java.sql.PreparedStatement#executeUpdate().
- Value Params
- after
after filter
- before
before filter
- params
parameters
- returnGeneratedKeys
is generated keys required
- template
SQL template
- Returns
result count
- Inherited from
- DBSession
Executes java.sql.PreparedStatement#executeUpdate().
Executes java.sql.PreparedStatement#executeUpdate().
- Value Params
- after
after filter
- before
before filter
- params
parameters
- template
SQL template
- Returns
result count
- Inherited from
- DBSession