MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / _build_sqlalchemy_url

Function _build_sqlalchemy_url

src/database/session.py:18–23  ·  view source on GitHub ↗
(database_url: str)

Source from the content-addressed store, hash-verified

16
17
18def _build_sqlalchemy_url(database_url: str) -> str:
19 if database_url.startswith("postgresql://"):
20 return "postgresql+psycopg://" + database_url[len("postgresql://"):]
21 if database_url.startswith("postgres://"):
22 return "postgresql+psycopg://" + database_url[len("postgres://"):]
23 return database_url
24
25
26def _get_env_int(name: str, default: int, minimum: int = 0) -> int:

Callers 2

get_database_backendFunction · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected