Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Added IbmDb2 db2_pclose to disconnect #333

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JargonMan
Copy link

Updated the disconnect method to choose db2_pclose or db2_close based on the resource's connectionParameter for persistence.

The public function connect() creates either persistent or non persistent db2 connections based on a connection parameter.

This update uses the same logic in the public function disconnect() to close the connection. Previously persistent connections would not have been closed with the db2_close() call, because they need the db2_pclose() call.

Updated the disconnect method to choose db2_pclose or db2_close based on the resource's connectionParameter for persistence.
Copy link
Member

@Ocramius Ocramius left a comment

Choose a reason for hiding this comment

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

Is there any way to test this in integration?

$p = $this->connectionParameters;

// given a list of key names, test for existence in $p
$findParameterValue = function (array $names) use ($p) {
Copy link
Member

Choose a reason for hiding this comment

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

Make a new private method returning bool instead. Also, array_change_key_case() is probably a better approach, since nothing guarantees that mIxEDCasE won't be given as parameter.

@JargonMan JargonMan closed this Aug 9, 2018
@Ocramius
Copy link
Member

Was this supposed to be closed?

@JargonMan JargonMan reopened this Aug 14, 2018
@JargonMan
Copy link
Author

Sorry, I'm new at GitHub and thought the pull request was rejected and I needed to create a new one.

@Ocramius
Copy link
Member

Ocramius commented Aug 14, 2018 via email

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at laminas/laminas-db#27.

@weierophinney
Copy link
Member

This repository has been moved to laminas/laminas-db. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

  • Squash all commits in your branch (git rebase -i origin/{branch})
  • Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
  • Run the laminas/laminas-migration tool on the code.
  • Clone laminas/laminas-db to another directory.
  • Copy the files from the second bullet point to the clone of laminas/laminas-db.
  • In your clone of laminas/laminas-db, commit the files, push to your fork, and open the new PR.
    We will be providing tooling via laminas/laminas-migration soon to help automate the process.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
3 participants
close