Skip to content

Commit 505ffd5

Browse files
committed
fix: add missing abstract methods
1 parent 8dc3f13 commit 505ffd5

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

system/Database/BaseConnection.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,6 +1481,13 @@ public function disableForeignKeyChecks()
14811481
return $this->query($sql);
14821482
}
14831483

1484+
/**
1485+
* Returns platform-specific SQL to disable foreign key checks.
1486+
*
1487+
* @return string
1488+
*/
1489+
abstract protected function _disableForeignKeyChecks();
1490+
14841491
/**
14851492
* Enables foreign key checks temporarily.
14861493
*/
@@ -1491,6 +1498,13 @@ public function enableForeignKeyChecks()
14911498
return $this->query($sql);
14921499
}
14931500

1501+
/**
1502+
* Returns platform-specific SQL to enable foreign key checks.
1503+
*
1504+
* @return string
1505+
*/
1506+
abstract protected function _enableForeignKeyChecks();
1507+
14941508
/**
14951509
* Allows the engine to be set into a mode where queries are not
14961510
* actually executed, but they are still generated, timed, etc.

system/Test/Mock/MockConnection.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,14 @@ protected function _transRollback(): bool
230230
{
231231
return true;
232232
}
233+
234+
protected function _disableForeignKeyChecks()
235+
{
236+
return '';
237+
}
238+
239+
protected function _enableForeignKeyChecks()
240+
{
241+
return '';
242+
}
233243
}

0 commit comments

Comments
 (0)