Skip to content

Commit dab8de2

Browse files
committed
approach with ClientSession manipulation
1 parent 1d101a5 commit dab8de2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

trino/dbapi.py

+6
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ def _prepare_statement(self, statement: str, name: str) -> None:
336336
experimental_python_types=self._experimental_pyton_types)
337337
query.execute()
338338

339+
# Approach with directly manipulating on ClientSession
340+
# self._connection._client_session.prepared_statements[name] = statement
341+
339342
def _execute_prepared_statement(
340343
self,
341344
statement_name,
@@ -426,6 +429,9 @@ def _deallocate_prepared_statement(self, statement_name: str) -> None:
426429
experimental_python_types=self._experimental_pyton_types)
427430
query.execute()
428431

432+
# Approach with directly manipulating on ClientSession
433+
# self._connection._client_session.prepared_statements.pop(statement_name, None)
434+
429435
def _generate_unique_statement_name(self):
430436
return 'st_' + uuid.uuid4().hex.replace('-', '')
431437

0 commit comments

Comments
 (0)