igorbenav/fastcrud

Option to Skip db.commit() During Write Operations

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.
When writing multiple records, if some fail, there is no option to roll back the changes.

Describe the solution you'd like
It should be possible to omit db.commit() within write methods, allowing users to call session commit or rollback externally. This would enable multiple records to be written within the same transaction.

created_record = await crud_xyz.create(db=db, object=record, skip_commit=True)

This can be done, I'll add it for the next version. Thanks for the issue!