feat: 実行SQLのタイムゾーンをJSTに変更するメソッドを追加
This commit is contained in:
parent
f039780c46
commit
cb47f7d186
@ -12,6 +12,7 @@ def exec():
|
||||
db = Database.get_instance()
|
||||
try:
|
||||
db.connect()
|
||||
db.to_jst()
|
||||
logger.debug('処理開始')
|
||||
# 卸販売実績テーブル(洗替後)作成
|
||||
_call_sales_lau_upsert(db)
|
||||
|
||||
@ -180,6 +180,9 @@ class Database:
|
||||
self.__connection.close()
|
||||
self.__connection = None
|
||||
|
||||
def to_jst(self):
|
||||
self.execute('SET time_zone = "+9:00"')
|
||||
|
||||
def __execute_with_transaction(self, query: str, parameters: dict):
|
||||
# トランザクションを開始してクエリを実行する
|
||||
with self.__connection.begin():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user