Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pypika/terms.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ def wrap_constant(

@staticmethod
def wrap_json(
val: Union["Term", "QueryBuilder", "Interval", None, str, int, bool], wrapper_cls=None
) -> Union["Term", "QueryBuilder", "Interval", "NullValue", "ValueWrapper", "JSON"]:
val: Union["Term", "QueryBuilder", None, str, int, bool], wrapper_cls=None
) -> Union["Term", "QueryBuilder", "NullValue", "ValueWrapper", "JSON"]:
from .queries import QueryBuilder

if isinstance(val, (Term, QueryBuilder, Interval)):
if isinstance(val, (Term, QueryBuilder)):
return val
if val is None:
return NullValue()
Expand Down Expand Up @@ -1614,7 +1614,7 @@ def get_special_params_sql(self, **kwargs: Any) -> Optional[str]:
return None


class Interval(Node):
class Interval(Term):
templates = {
# PostgreSQL, Redshift and Vertica require quotes around the expr and unit e.g. INTERVAL '1 week'
Dialects.POSTGRESQL: "INTERVAL '{expr} {unit}'",
Expand Down
Loading