refactor: textwrap.dedentを使って余分な半角スペースを消す
This commit is contained in:
parent
2f230e2f15
commit
f4b03c0c45
@ -1,12 +1,15 @@
|
||||
from src.config.objects import TargetObject, LastFetchDatetime
|
||||
import textwrap
|
||||
|
||||
from src.config.objects import LastFetchDatetime, TargetObject
|
||||
|
||||
|
||||
class SOQLBuilder:
|
||||
def __init__(self, target_object: TargetObject, last_fetch_datetime: LastFetchDatetime) -> None:
|
||||
self.__SELECT_SOQL = """SELECT {column_or_expression} FROM {object_name}
|
||||
WHERE {datetime_column} > {last_fetch_datetime_from}
|
||||
AND {datetime_column} <= {last_fetch_datetime_to}
|
||||
"""
|
||||
self.__SELECT_SOQL = textwrap.dedent("""\
|
||||
SELECT {column_or_expression} FROM {object_name}
|
||||
WHERE {datetime_column} > {last_fetch_datetime_from}
|
||||
AND {datetime_column} <= {last_fetch_datetime_to}
|
||||
""")
|
||||
self.__target_object = target_object
|
||||
self.__last_fetch_datetime = last_fetch_datetime
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user