8000 Use the same statement resource for repeated execution of the same statement on SQL Server by morozov · Pull Request #2494 · doctrine/dbal · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use the same statement resource for repeated execution of the same statement on SQL Server #2494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2016

Conversation

morozov
Copy link
Member
@morozov morozov commented Sep 1, 2016

Fixes #2493.

if ( ! $this->stmt) {
$stmt = sqlsrv_prepare($this->conn, $this->sql, $this->params);
if (!$stmt) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch should be tested.

Also, add empty lines around control structures

@morozov morozov force-pushed the sqlsrv-reuse-statement branch from 11a8200 to 67f8ba0 Compare September 2, 2016 01:25

// it's impossible to prepare the statement without bound variables for SQL Server,
// so the preparation happens before the first execution when variables are already in place
$this->setExpectedException('Doctrine\\DBAL\\Driver\\SQLSrv\\SQLSrvException');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use SQLSrvException::class here, since I think that we bumped version requirements to minimum PHP 5.5

@Ocramius Ocramius added this to the 2.6 milestone Sep 7, 2016
@Ocramius Ocramius self-assigned this Sep 7, 2016
@Ocramius
Copy link
Member
Ocramius commented Sep 7, 2016

Other than that ::class, seems good!

@Ocramius Ocramius merged commit b0e5314 into doctrine:master Sep 7, 2016
Ocramius added a commit that referenced this pull request Sep 7, 2016
Ocramius added a commit that referenced this pull request Sep 7, 2016
Ocramius added a commit that referenced this pull request Sep 7, 2016
Ocramius added a commit that referenced this pull request Sep 7, 2016
@Ocramius
Copy link
Member
Ocramius commented Sep 7, 2016

@morozov merged, thanks!

@morozov morozov deleted the sqlsrv-reuse-statement branch September 9, 2016 21:46
@Ocramius Ocramius changed the title Use the same statement resource for repeated execution of the statement Use the same statement resource for repeated execution of the same statement on SQL Server Jul 22, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0