class Session (View source)

Class Session

Methods

bool
close()

Close the session with the server.

object
commit()

Commit the transaction.

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.

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.

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.

Details

bool close()

Close the session with the server.

Return Value

bool

object commit()

Commit the transaction.

Return Value

object

Schema createSchema(string $schema_name)

Creates a new schema.

Parameters

string $schema_name

Return Value

Schema

bool dropSchema(string $schema_name)

Drop a schema (database).

Parameters

string $schema_name

Return Value

bool

string generateUUID()

Generate a Universal Unique IDentifier (UUID) generated according to » RFC 4122.

Return Value

string

Schema getSchema(string $schema_name)

Get a new schema object

Parameters

string $schema_name

Return Value

Schema

array getSchemas()

Get schema objects for all schemas available to the session.

Return Value

array

int getServerVersion()

Retrieve the MySQL server version for the session.

Return Value

int

array listClients()

Get a list of client connections to the session's MySQL server.

Return Value

array

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.

Parameters

string $name

Return Value

string

void releaseSavepoint(string $name)

Release a previously set savepoint.

Parameters

string $name

Return Value

void

void rollback()

Rollback the transaction.

Return Value

void

void rollbackTo(string $name)

Rollback transaction to savepoint

Parameters

string $name

Return Value

void

string setSavepoint(string $name)

Create a new savepoint for the transaction.

Parameters

string $name

Return Value

string

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.

Parameters

string $query

Return Value

SqlStatement

void startTransaction()

Start a new transaction.

Return Value

void