Page MenuHomeDevCentral

Check table and view existence
ClosedPublic

Authored by dereckson on Feb 11 2022, 00:21.
Tags
None
Referenced Files
F34900143: D2511.id6337.diff
Fri, Jul 3, 19:34
F34899400: D2511.id6334.diff
Fri, Jul 3, 19:07
F34897977: D2511.diff
Fri, Jul 3, 18:28
F34897387: D2511.id.diff
Fri, Jul 3, 18:14
F34889306: D2511.id6337.diff
Fri, Jul 3, 16:16
F34882683: D2511.id6333.diff
Fri, Jul 3, 15:30
F34865130: D2511.diff
Fri, Jul 3, 13:29
Unknown Object (File)
Wed, Jul 1, 22:02
Subscribers
None

Details

Summary

An example of use is Zed site health check for database views.
This check detect frequent import/export issues with views:

$notExistingViews = Vector::from(self::DOCUMENTED_VIEWS)
    ->filter(fn($view) => !$this->db->isExistingTable(
        $this->config['database']['database'],
        $view
    ));
$viewsAsTables = Vector::from(self::DOCUMENTED_VIEWS)
    ->filter(fn($view) => !$this->db->isView(
        $this->config['database']['database'],
        $view
    ));

Ref T1678.

Diff Detail

Repository
rKDB Keruald Database
Lint
Lint Errors
SeverityLocationCodeMessage
Errorsrc/Engines/MySQLiEngine.php:48PHPCS.E.Generic.Files.LineLength.MaxExceededGeneric.Files.LineLength.MaxExceeded
Unit
Tests Passed
Branch
main
Build Status
Buildable 3920
Build 4171: arc lint + arc unit

Event Timeline

dereckson created this revision.
This revision is now accepted and ready to land.Feb 11 2022, 00:43
This revision was landed with ongoing or failed builds.Feb 11 2022, 00:52
This revision was automatically updated to reflect the committed changes.