Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Sep 2, 2024
1 parent 4271a41 commit b4883eb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions src/Dibi/Drivers/PdoResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public function __construct(\PDOStatement $resultSet, string $driverName)
}


public function __destruct()
{
$this->resultSet?->closeCursor();
}


/**
* Returns the number of rows in a result set.
*/
Expand Down Expand Up @@ -63,6 +69,7 @@ public function seek(int $row): bool
*/
public function free(): void
{
$this->resultSet?->closeCursor();
$this->resultSet = null;
}

Expand Down
12 changes: 6 additions & 6 deletions tests/databases.github.ini
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ database = dibi_test
port = 1433
system = sqlsrv

;[sqlsrv pdo]
;driver = pdo
;dsn = "sqlsrv:Server=localhost,1433;Database=dibi_test"
;user = SA
;password = "YourStrong!Passw0rd"
;system = sqlsrv
[sqlsrv pdo]
driver = pdo
dsn = "sqlsrv:Server=localhost,1433;Database=dibi_test"
user = SA
password = "YourStrong!Passw0rd"
system = sqlsrv

0 comments on commit b4883eb

Please sign in to comment.