You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
429 B
15 lines
429 B
|
4 days ago
|
from sqlalchemy import create_engine, text
|
||
|
|
try:
|
||
|
|
from app.db_schema import ensure_schema
|
||
|
|
except ModuleNotFoundError:
|
||
|
|
from db_schema import ensure_schema
|
||
|
|
|
||
|
|
engine = create_engine("postgresql://postgres:postgres@localhost:5432/decision_engine")
|
||
|
|
|
||
|
|
with engine.connect() as conn:
|
||
|
|
ensure_schema(conn)
|
||
|
|
rows = conn.execute(text("SELECT name FROM domains"))
|
||
|
|
print("Domains:")
|
||
|
|
for r in rows:
|
||
|
|
print("-", r[0])
|