Nuno André

Results 24 comments of Nuno André

Hi! FWIW, SQLModel [replicates both SQLAlchemy and Pydantic](https://github.com/tiangolo/sqlmodel/blob/a36c6d5778e23bb310c18992b2f301ffb34e8c8e/sqlmodel/main.py#L212). It seems that supporting it may be very straightforward. This just works (cc #108): ```python from sqlmodel import SQLModel, Field, func, create_engine...

Good point, @ChuckMoe! It's truly impressive the amount of boilerplate that can be reduced with SQLModel and FastAPI-CRUDRouter. I've updated the example with the _UpdateModel_ > _CreateModel_ > _BaseModel_ approach.

Hi @christophelec! I would also set `index` to `False` if `Undefined` (which is the SQLAlchemy's default) so that a `UNIQUE CONSTRAINT` clause be included in the column definition. Otherwise, an...

Add an option to show/hide elements. Maybe a checkbox in `treeview1` that comment/uncomment the selected xml code.

So _archive type_ is somewhat of a misnomer, because `.zip` files are indeed archives, but `.gz` isn't. Maybe _compressed type_ would be a more appropriate name? Cheers!

It would be nice if `ForeignKey.ondelete` and `ForeignKey.onupdate` were also included, to avoid having to explicitly instantiate `ForeignKey` in such common use cases. ```python class AnotherModel(SQLModel, table=True): foo: int =...

FWIW. I get the `Future attached to a different loop` exception when changing the suggested fixture: ```python @pytest.fixture(scope='session') def event_loop(): policy = asyncio.get_event_loop_policy() loop = policy.new_event_loop() yield loop loop.close() ```...

Adding another example with _SQLModel_ (which subclasses _Pydantic_'s `BaseModel` and _SQLAlchemy_'s `DeclarativeMeta` avoiding the need to declare model and schema separately). The above example would look something like this. The...

Python tests are usually coded to be executed through a testing framework. In this case ``` cd python -m pytest tests # either: # py.test tests ```

IIUC the feature request is about key ordering at a model level. But maybe an intermediate option with the extra fields ordered after the declared ones could be implemented with...