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

xzkostyan / clickhouse-sqlalchemy / 11405726556

18 Oct 2024 02:28PM UTC coverage: 85.988% (-0.09%) from 86.082%
11405726556

push

github

xzkostyan
Version bumped to 0.2.7

1 of 1 new or added line in 1 file covered. (100.0%)

63 existing lines in 11 files now uncovered.

2332 of 2712 relevant lines covered (85.99%)

20.04 hits per line

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

95.45
/clickhouse_sqlalchemy/sql/selectable.py
1
from sqlalchemy.sql.base import _generative
16✔
2
from sqlalchemy.sql.selectable import (
24✔
3
    Select as StandardSelect,
4
    Join
5
)
6

7
from ..ext.clauses import (
24✔
8
    ArrayJoin,
9
    LeftArrayJoin,
10
    LimitByClause,
11
    sample_clause,
12
)
13

14

15
__all__ = ('Select', 'select')
24✔
16

17

18
class Select(StandardSelect):
24✔
19
    _with_cube = False
24✔
20
    _with_rollup = False
24✔
21
    _with_totals = False
24✔
22
    _final_clause = None
24✔
23
    _sample_clause = None
24✔
24
    _limit_by_clause = None
24✔
25
    _array_join = None
24✔
26

27
    @_generative
24✔
28
    def with_cube(self):
20✔
29
        self._with_cube = True
24✔
30

31
    @_generative
24✔
32
    def with_rollup(self):
20✔
33
        self._with_rollup = True
24✔
34

35
    @_generative
24✔
36
    def with_totals(self):
20✔
37
        self._with_totals = True
24✔
38

39
    @_generative
24✔
40
    def final(self):
20✔
41
        self._final_clause = True
24✔
42

43
    @_generative
24✔
44
    def sample(self, sample):
20✔
45
        self._sample_clause = sample_clause(sample)
24✔
46

47
    @_generative
24✔
48
    def limit_by(self, by_clauses, limit, offset=None):
24✔
49
        self._limit_by_clause = LimitByClause(by_clauses, limit, offset)
24✔
50

51
    def _add_array_join(self, columns, left):
24✔
52
        join_type = ArrayJoin if not left else LeftArrayJoin
24✔
53
        self._array_join = join_type(*columns)
24✔
54

55
    @_generative
24✔
56
    def array_join(self, *columns, **kwargs):
20✔
57
        left = kwargs.get("left", False)
24✔
58
        self._add_array_join(columns, left=left)
24✔
59

60
    @_generative
24✔
61
    def left_array_join(self, *columns):
20✔
62
        self._add_array_join(columns, left=True)
24✔
63

64
    def join(self, right, onclause=None, isouter=False, full=False, type=None,
24✔
65
             strictness=None, distribution=None):
UNCOV
66
        flags = tuple({
×
67
            'full': full,
68
            'type': type,
69
            'strictness': strictness,
70
            'distribution': distribution
71
        }.items())
UNCOV
72
        return Join(self, right, onclause=onclause, isouter=isouter,
×
73
                    full=flags)
74

75

76
select = Select._create
24✔
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