• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ICanBoogie / ActiveRecord / 11645353913

02 Nov 2024 07:44PM UTC coverage: 86.318%. Remained the same
11645353913

push

github

olvlvl
Tidy Query

9 of 18 new or added lines in 2 files covered. (50.0%)

98 existing lines in 6 files now uncovered.

1369 of 1586 relevant lines covered (86.32%)

24.43 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.71
/lib/ActiveRecord/Driver/SQLiteDriver.php
1
<?php
2

3
namespace ICanBoogie\ActiveRecord\Driver;
4

5
use ICanBoogie\ActiveRecord\Schema;
6

7
/**
8
 * Connection driver for SQLite.
9
 */
10
final class SQLiteDriver extends BasicDriver
11
{
12
    /**
13
     * @inheritDoc
14
     */
15
    protected function render_create_table(string $table_name, Schema $schema): string
16
    {
17
        return (new TableRendererForSQLite())
67✔
18
            ->render($schema, $table_name);
67✔
19
    }
20

21
    /**
22
     * @inheritdoc
23
     */
24
    public function table_exists(string $table_name): bool
25
    {
26
        $tables = $this->connection
36✔
27
            ->query('SELECT name FROM sqlite_master WHERE type = "table" AND name = ?', [ $table_name ])
36✔
28
            ->all(\PDO::FETCH_COLUMN);
36✔
29

30
        return count($tables) > 0;
36✔
31
    }
32

33
    /**
34
     * @inheritdoc
35
     */
36
    public function optimize(): void
37
    {
UNCOV
38
        $this->connection->exec('VACUUM');
×
39
    }
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc