class SqlServerConnection implements ServerInfoAwareConnection (View source)

Properties

protected Connection $connection

The underlying connection instance.

Methods

void
__construct(Connection $connection)

Create a new SQL Server connection instance.

Statement
prepare(string $sql)

Prepare a new SQL statement.

Result
query(string $sql)

Execute a new query against the connection.

int
exec(string $statement)

Execute an SQL statement.

mixed
lastInsertId(string|null $name = null)

Get the last insert ID.

bool
beginTransaction()

Begin a new database transaction.

bool
commit()

Commit a database transaction.

bool
rollBack()

Rollback a database transaction.

string
quote(string $value, int $type = ParameterType::STRING)

Wrap quotes around the given input.

string
getServerVersion()

Get the server version for the connection.

PDO
getWrappedConnection()

Get the wrapped PDO connection.

Details

void __construct(Connection $connection)

Create a new SQL Server connection instance.

Parameters

Connection $connection

Return Value

void

Statement prepare(string $sql)

Prepare a new SQL statement.

Parameters

string $sql

Return Value

Statement

Result query(string $sql)

Execute a new query against the connection.

Parameters

string $sql

Return Value

Result

int exec(string $statement)

Execute an SQL statement.

Parameters

string $statement

Return Value

int

mixed lastInsertId(string|null $name = null)

Get the last insert ID.

Parameters

string|null $name

Return Value

mixed

bool beginTransaction()

Begin a new database transaction.

Return Value

bool

bool commit()

Commit a database transaction.

Return Value

bool

bool rollBack()

Rollback a database transaction.

Return Value

bool

string quote(string $value, int $type = ParameterType::STRING)

Wrap quotes around the given input.

Parameters

string $value
int $type

Return Value

string

string getServerVersion()

Get the server version for the connection.

Return Value

string

PDO getWrappedConnection()

Get the wrapped PDO connection.

Return Value

PDO