Files
windmill/community/scripts/u/bot/query_postgres.py
Ruben Fiszel 2e132878e4 first commit
2022-05-05 04:25:58 +02:00

13 lines
292 B
Python
Executable File

import os
from wmill_pg import query
def main(
pg_con: dict, # a resource of type postgres (constrained at step 3: UI customisation)
sql_query: str = "SELECT * from demo"
):
# query that returns rows will return them as a list
return query(sql_query, pg_con)