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

lampager / lampager-cakephp / 4438718589

pending completion
4438718589

push

github

GitHub
Run CI tests on the latest postgres (#45)

208 of 226 relevant lines covered (92.04%)

61.86 hits per line

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

0.0
/src/Database/SqliteCompiler.php
1
<?php
2

3
namespace Lampager\Cake\Database;
4

5
use Cake\Database\SqliteCompiler as BaseSqliteCompiler;
6

7
class SqliteCompiler extends BaseSqliteCompiler
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    protected function _buildSelectPart($parts, $query, $generator)
13
    {
×
14
        if (!$query->clause('union')) {
×
15
            return parent::_buildSelectPart($parts, $query, $generator);
×
16
        }
×
17

18
        return sprintf('SELECT * FROM (%s', parent::_buildSelectPart($parts, $query, $generator));
×
19
    }
×
20

21
    /**
22
     * {@inheritdoc}
23
     */
24
    protected function _buildUnionPart($parts, $query, $generator)
25
    {
×
26
        $parts = array_map(function ($p) use ($generator) {
27
            $p['query'] = $p['query']->sql($generator);
×
28
            $p['query'] = $p['query'][0] === '(' ? trim($p['query'], '()') : $p['query'];
×
29
            $prefix = $p['all'] ? 'ALL ' : '';
×
30
            return sprintf('%sSELECT * FROM (%s)', $prefix, $p['query']);
×
31
        }, $parts);
×
32

33
        return sprintf(")\nUNION %s", implode("\nUNION ", $parts));
×
34
    }
×
35
}
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

© 2025 Coveralls, Inc