foxhole/app/hysql.hy

13 lines
321 B
Hy
Raw Normal View History

2024-03-11 15:35:32 +01:00
#!/usr/bin/env hy
(import app [models])
(import app.database [async_session])
(import sqlalchemy [select])
(import pprint [pprint])
(defn/a selete_object
[db ap_type]
(.all (await (.scalars db
(.where (select models.InboxObject)
(= models.InboxObject.ap_type ap_type))))))