MCPcopy Create free account
hub / github.com/apache/impala / _connect

Method _connect

tests/comparison/db_connection.py:1088–1101  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1086 self._session_id = self.execute_and_fetchall('SELECT connection_id()')[0][0]
1087
1088 def _connect(self):
1089 try:
1090 import MySQLdb
1091 except Exception:
1092 print('Error importing MySQLdb. Please make sure it is installed. '
1093 'See the README for details.')
1094 raise
1095 self._conn = MySQLdb.connect(
1096 host=self._host_name,
1097 port=self._port,
1098 user=self._user_name,
1099 passwd=self._password,
1100 db=self.db_name)
1101 self._conn.autocommit = True
1102
1103 @property
1104 def supports_kill_connection(self):

Callers

nothing calls this directly

Calls 1

connectMethod · 0.45

Tested by

no test coverage detected