AlexanderPodorov

Results 16 comments of AlexanderPodorov

Hi, Having it as a `bool` is nice, since we can use it as a `bool` in all related contexts. I guess for those databases where `bool` is not supported,...

@max-muoto , actually no. I'm using it all the time. See the example code that works as expected: ```python type NonZeroMonetaryDecimal = Annotated[ Decimal, AfterValidator(validate_non_zero_decimal), AfterValidator(validate_monetary_decimal), Field(gt=-1_048_576, lt=1_048_576, multiple_of=Decimal("0.01")), ]...

@anguspmitchell , I think you should avoid dependencies like this: ```python @contextmanager def session_scope(expire_on_commit: bool = True) -> sqlalchemy.orm.session.Session: orm_session = _orm_session(expire_on_commit=expire_on_commit) try: yield orm_session orm_session.commit() except: orm_session.rollback() raise finally:...

Yes, I think this approach should work. And yes, you can create a session in the endpoint function. My 1. and 2. points are related to dependency approach. BTW, as...

Hi @samuelcolvin, Thanks a lot for getting back to it! Absolutely no worries! Community and I are grateful for such an excellent library. Full plan sounds great, looking forward to...

Thanks, @micheleAlberto , Sorry I was not very specific by saying "fails". It failed with pydantic internal error in `v2.6.4`, but for some reason it works in `v2.7.1`. Both json...