MCPcopy Index your code
hub / github.com/dbcli/pgcli / db_connection

Function db_connection

tests/utils.py:12–21  ·  view source on GitHub ↗
(dbname=None)

Source from the content-addressed store, hash-verified

10
11
12def db_connection(dbname=None):
13 conn = psycopg.connect(
14 user=POSTGRES_USER,
15 host=POSTGRES_HOST,
16 password=POSTGRES_PASSWORD,
17 port=POSTGRES_PORT,
18 dbname=dbname,
19 )
20 conn.autocommit = True
21 return conn
22
23
24try:

Callers 3

connectionFunction · 0.90
utils.pyFile · 0.85
create_dbFunction · 0.85

Calls 1

connectMethod · 0.45

Tested by 1

connectionFunction · 0.72