The Session
object is always available as the
session
property of the global object.
Session
has the methods listed here:
getOption(String
: Gets the value of statement optionname
)name
. Returns a string or a true-false value depending on the option type.prepare(String
: Enables the execution of a prepared statements; takes an SQL statement and returns asql
, {passResultToClient
: Bool,charsetName
: String})PreparedStatement
object.Calling this method is equivalent to executing a
PREPARE
statement in the mysql client.runSql(String
: Executes a query, with any options specified, and using an optional list of statement parameters; it returns anquery
[[, ArraystatementParameters
], Optionsoptions
])SqlResult
.setOptions(Object
: Sets statement option defaults. Options not specified assume their default values.options
)sql(String
: Executes a simple SQL statement. Can also be used to provide attributes overriding thesql
, {passResultToClient
: Bool,charsetName
: String})passResultlToClient
andcharsetName
values set in the session. Returns anSqlExecute
object.