Skip to content

clause_base

ClauseBase

Bases: ABC

ABC for ORDER BY and WHERE clauses.

Not all use the get_count() directly (those with no bindings) but their children might.

Source code in src/embar/query/clause_base.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class ClauseBase(ABC):
    """
    ABC for ORDER BY and WHERE clauses.

    Not all use the get_count() directly (those with no bindings)
    but their children might.
    """

    @abstractmethod
    def sql(self, get_count: GetCount) -> QuerySingle:
        """
        Generate the SQL fragment for this clause.
        """
        ...

sql(get_count) abstractmethod

Generate the SQL fragment for this clause.

Source code in src/embar/query/clause_base.py
20
21
22
23
24
25
@abstractmethod
def sql(self, get_count: GetCount) -> QuerySingle:
    """
    Generate the SQL fragment for this clause.
    """
    ...