MCPcopy Create free account
hub / github.com/apecloud/myduckserver / connect

Method connect

compatibility/pg/python/pg_test.py:40–51  ·  view source on GitHub ↗
(self, ip, port, user, password)

Source from the content-addressed store, hash-verified

38 self.tests = []
39
40 def connect(self, ip, port, user, password):
41 try:
42 self.conn = psycopg.connect(
43 host=ip,
44 port=port,
45 dbname="postgres",
46 user=user,
47 password=password,
48 autocommit=True
49 )
50 except Exception as e:
51 raise RuntimeError(e)
52
53 def disconnect(self):
54 self.conn.close()

Callers 1

pg_test.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected