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

ICanBoogie / ActiveRecord / 6362433236

30 Sep 2023 11:14AM UTC coverage: 85.731% (+5.6%) from 80.178%
6362433236

push

github

olvlvl
Rename StaticModelProvider methods

1436 of 1675 relevant lines covered (85.73%)

29.41 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
/*
4
 * This file is part of the ICanBoogie package.
5
 *
6
 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
namespace ICanBoogie\ActiveRecord\Driver;
13

14
use ICanBoogie\ActiveRecord\Schema;
15

16
/**
17
 * Connection driver for SQLite.
18
 */
19
final class SQLiteDriver extends BasicDriver
20
{
21
    /**
22
     * @inheritDoc
23
     */
24
    protected function render_create_table(string $table_name, Schema $schema): string
25
    {
26
        return (new TableRendererForSQLite())
76✔
27
            ->render($schema, $table_name);
76✔
28
    }
29

30
    /**
31
     * @inheritdoc
32
     */
33
    public function table_exists(string $name): bool
34
    {
35
        $tables = $this->connection
61✔
36
            ->query('SELECT name FROM sqlite_master WHERE type = "table" AND name = ?', [ $name ])
61✔
37
            ->all(\PDO::FETCH_COLUMN);
61✔
38

39
        return count($tables) > 0;
61✔
40
    }
41

42
    /**
43
     * @inheritdoc
44
     */
45
    public function optimize(): void
46
    {
47
        $this->connection->exec('VACUUM');
×
48
    }
49
}
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