1 | """ |
||
2 | ETLT |
||
3 | |||
4 | Copyright 2016 Set Based IT Consultancy |
||
5 | |||
6 | Licence MIT |
||
7 | """ |
||
8 | import abc |
||
9 | |||
10 | from etlt.condition.Condition import Condition |
||
11 | |||
12 | |||
13 | class SimpleCondition(Condition, metaclass=abc.ABCMeta): |
||
0 ignored issues
–
show
|
|||
14 | """ |
||
15 | A simple condition matches a single field in the row against an expression. |
||
16 | """ |
||
17 | # ------------------------------------------------------------------------------------------------------------------ |
||
18 | def __init__(self, field, expression): |
||
19 | """ |
||
20 | Object contructor. |
||
21 | |||
22 | :param str field: The name of the field in the row that must be match against the expression. |
||
23 | :param str expression: The expression. |
||
24 | """ |
||
25 | self._field = field |
||
26 | """ |
||
27 | The name of the field in the row that must be match against the glob. |
||
28 | |||
29 | :type: str |
||
30 | """ |
||
31 | |||
32 | self._expression = expression |
||
33 | """ |
||
34 | The expression. |
||
35 | |||
36 | :type: str |
||
37 | """ |
||
38 | |||
39 | # ---------------------------------------------------------------------------------------------------------------------- |
||
40 |
Methods which raise
NotImplementedError
should be overridden in concrete child classes.