Session
class Session (View source)
Class Session
Methods
Close the session with the server.
Commit the transaction.
Creates a new schema.
Drop a schema (database).
Generate a Universal Unique IDentifier (UUID) generated according to » RFC 4122.
Get schema objects for all schemas available to the session.
Retrieve the MySQL server version for the session.
Get a list of client connections to the session's MySQL server.
Add quotes A quoting function to escape SQL names and identifiers. It escapes the identifier given in accordance to the settings of the current connection. This escape function should not be used to escape values.
Release a previously set savepoint.
Rollback the transaction.
Rollback transaction to savepoint
Create a new savepoint for the transaction.
Create a native SQL statement. Placeholders are supported using the native "?" syntax. Use the execute method to execute the SQL statement.
Start a new transaction.
Details
bool
close()
Close the session with the server.
object
commit()
Commit the transaction.
Schema
createSchema(string $schema_name)
Creates a new schema.
bool
dropSchema(string $schema_name)
Drop a schema (database).
string
generateUUID()
Generate a Universal Unique IDentifier (UUID) generated according to » RFC 4122.
Schema
getSchema(string $schema_name)
Get a new schema object
array
getSchemas()
Get schema objects for all schemas available to the session.
int
getServerVersion()
Retrieve the MySQL server version for the session.
array
listClients()
Get a list of client connections to the session's MySQL server.
string
quoteName(string $name)
Add quotes A quoting function to escape SQL names and identifiers. It escapes the identifier given in accordance to the settings of the current connection. This escape function should not be used to escape values.
void
releaseSavepoint(string $name)
Release a previously set savepoint.
void
rollback()
Rollback the transaction.
void
rollbackTo(string $name)
Rollback transaction to savepoint
string
setSavepoint(string $name)
Create a new savepoint for the transaction.
SqlStatement
sql(string $query)
Create a native SQL statement. Placeholders are supported using the native "?" syntax. Use the execute method to execute the SQL statement.
void
startTransaction()
Start a new transaction.