piccolo
piccolo copied to clipboard
A fast, user friendly ORM and query builder which supports asyncio.
Resolves https://github.com/piccolo-orm/piccolo/issues/856 Currently just a quick prototype to make sure it's possible. Remaining tasks: - [ ] Get it working with , `is_in` etc (by proxying methods) - [ ]...
If we have this table: ```python class Concert(Table): band = ForeignKey(Band) venue = ForeignKey(Venue) starts = Timestamptz() ``` If we want to get the year that the concert is on,...
Hi, How to use window functions in piccolo? And how to use `case when then`. [postgresql-window-function](https://www.postgresqltutorial.com/postgresql-window-function/postgresql-row_number/)
Setting `primary_key` for multiple columns only looks at the last-most column.
Wondering how difficult it would be to eventually add a third choice in the `piccolo asgi new` for selecting the database... I'm just setting up a Litestar + Piccolo environment...
You are doing a fantastic job, and have gone above and beyond as a maintainer to serve your users. Is there a GitHub Sponsors program available, or any other sort...
In an ideal world with `pytest-asyncio` we could do this: ```python @pytest.fixture(scope="function", autouse=True) async def piccolo_transaction(event_loop): DB: PostgresEngine = engine_finder() async with DB.transaction(): yield ``` But `pytest-asyncio` has an issue...
### Discussed in https://github.com/piccolo-orm/piccolo/discussions/683 Originally posted by **Drapersniper** November 21, 2022 ```py class Track(Table): track_id = BigInt(primary_key=True) class Playlist(Table): id = BigInt(primary_key=True) tracks = M2M(LazyTableReference("TrackToPlaylist", module_path=__module__)) class Album(Table): id =...
Hi, Most of the features required for postgres integration are available I believe. Can we add ‘check constraint’ for table models. How do we do it today if at all...
So I'm creating a new table with varchar primary key which has another name than `id`. ```python import piccolo.columns as cl from piccolo.table import Table class Currency(Table): code = cl.Varchar(primary_key=True)...