예제 #1
0
 def is_aggregate(self) -> Optional[bool]:
     """
     This is a shortcut that assumes if a function has a single argument and that argument is aggregated, then this
     function is also aggregated. A more sophisticated approach is needed, however it is unclear how that might work.
     :returns:
         True if the function accepts one argument and that argument is aggregate.
     """
     return resolve_is_aggregate([arg.is_aggregate for arg in self.args])
예제 #2
0
 def is_aggregate(self):
     # True if all cases are True or None. None all cases are None. Otherwise, False
     return resolve_is_aggregate(
         [term.is_aggregate for _, term in self._cases] +
         [self._else.is_aggregate if self._else else None])
예제 #3
0
 def is_aggregate(self):
     # True if both left and right terms are True or None. None if both terms are None. Otherwise, False
     return resolve_is_aggregate(
         [self.left.is_aggregate, self.right.is_aggregate])
예제 #4
0
 def is_aggregate(self):
     return resolve_is_aggregate(
         [term.is_aggregate for term in [self.left, self.right]])
예제 #5
0
파일: terms.py 프로젝트: alla-levina/pypika
 def is_aggregate(self) -> Optional[bool]:
     # True if all criterions/cases are True or None. None all cases are None. Otherwise, False
     return resolve_is_aggregate(
           [criterion.is_aggregate or term.is_aggregate for criterion, term in self._cases]
           + [self._else.is_aggregate if self._else else None]
     )
예제 #6
0
파일: terms.py 프로젝트: alla-levina/pypika
 def is_aggregate(self) -> Optional[bool]:
     return resolve_is_aggregate(
           [term.is_aggregate for term in [self.left, self.right]]
     )
예제 #7
0
파일: terms.py 프로젝트: alamart/pypika
 def is_aggregate(self):
     # True if all cases are True or None. None all cases are None. Otherwise, False
     return resolve_is_aggregate([term.is_aggregate for _, term in self._cases]
                                 + [self._else.is_aggregate if self._else else None])
예제 #8
0
파일: terms.py 프로젝트: alamart/pypika
 def is_aggregate(self):
     # True if both left and right terms are True or None. None if both terms are None. Otherwise, False
     return resolve_is_aggregate([self.left.is_aggregate, self.right.is_aggregate])
예제 #9
0
 def is_aggregate(self) -> bool:
     return resolve_is_aggregate([val.is_aggregate for val in self.values])
예제 #10
0
파일: terms.py 프로젝트: kayak/pypika
 def is_aggregate(self):
     return resolve_is_aggregate([term.is_aggregate for term in [self.left, self.right]])