feat(native-filters): add temporal support to select filter (#13622)

This commit is contained in:
Ville Brofeldt
2021-03-18 16:15:43 +02:00
committed by GitHub
parent adc247b7e4
commit 13f7e0d755
21 changed files with 391 additions and 60 deletions

View File

@@ -86,7 +86,7 @@ class SqliteEngineSpec(BaseEngineSpec):
@classmethod
def convert_dttm(cls, target_type: str, dttm: datetime) -> Optional[str]:
tt = target_type.upper()
if tt == utils.TemporalType.TEXT:
if tt in (utils.TemporalType.TEXT, utils.TemporalType.DATETIME):
return f"""'{dttm.isoformat(sep=" ", timespec="microseconds")}'"""
return None