Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit 73b183d

Browse files
Merge pull request #26 from Lordshinjo/is_disconnect
Implement is_disconnect
2 parents a5afaf6 + 582c09a commit 73b183d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

sqla_vertica_python/vertica_python.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ def initialize(self, connection):
6565
super(PGDialect, self).initialize(connection)
6666
self.implicit_returning = False
6767

68+
def is_disconnect(self, e, connection, cursor):
69+
return (
70+
isinstance(e, self.dbapi.Error) and
71+
connection is not None and
72+
connection.closed()
73+
)
74+
6875
@classmethod
6976
def dbapi(cls):
7077
vp_module = __import__('vertica_python')

0 commit comments

Comments
 (0)