Skip to content

Conversation

@Tinitto
Copy link
Contributor

@Tinitto Tinitto commented Feb 18, 2025

Why

To show how the library can be used in a real application.

What was done:

Added

  • Added todos example application

Changed

  • Replaced the second required argument of MongoStore.find(),
    MongoStore.update(), MongoStore.delete()with their first optional
    key-word argument query.
  • Changed the limit parameter of the MongoStore.find() to be by default 0.
  • Removed the Beanie-odm-specific arguments passed to MongoStore.insert(),
    MongoStore.find(), MongoStore.update(), MongoStore.delete().

Fixed

  • Fixed error: "got Future attached to a different loop" when
    MongoStore.insert(), MongoStore.find(), MongoStore.update(), MongoStore.delete()
    are called especially during tests that create different event loops.
  • Fixed SQLStore.delete() to return any nested items that were deleted.
  • Fixed error: "got Future attached to a different loop" when
    RedisStore.insert(), RedisStore.find(), RedisStore.update(), RedisStore.delete()
    are called especially during tests that create different event loops.

… on MongoStore

This seemed to occur in applications where
multiple event loops might be created but all access the same schema or model classes e.g. in pytests.
… in RedisStore

RedisModel's are originally associated with a given database at registration.
During execution, this database is accessed at RedisModel.db().
When the same model is registered in different databases, an error would be thrown.
This was resolved by setting the database to the
current database before every CRUD operation.
@Tinitto Tinitto force-pushed the enhancement/examples branch from 0efd1a5 to 8ab6be7 Compare February 18, 2025 22:02
@Tinitto Tinitto force-pushed the enhancement/examples branch from 8ab6be7 to 759b50b Compare February 18, 2025 22:06
@Tinitto Tinitto merged commit db3a4d6 into main Feb 18, 2025
21 checks passed
@Tinitto Tinitto deleted the enhancement/examples branch February 18, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants