Replies: 2 comments
-
you can use any database with aiogram, the easiest way I think would be to use the aiosqilte library |
Beta Was this translation helpful? Give feedback.
-
Both ways from your examples is wrong. I'll preffer to not say how to solve your issue on legacy 2.x version, it's time to migrate to the latest stable version 3.x and solve this issue on it with described way in the documentation. https://docs.aiogram.dev/en/dev-3.x/dispatcher/dependency_injection.html Solution for 2.x should be similar. |
Beta Was this translation helpful? Give feedback.
-
I query DynamoDB from aiogram bot. What is the intended way to use DB from aiogram?
dispatcher.storage
As I understand
dispatcher.storage
is only to store user state for FSM + limit requests rate. I need to do generic queries like "find newest post in posts table"Implement singleton DB similar to Bot and Dispatcher
I do not like global DB object. Seems hard to test
My current solution with context
Extra code, seem non native to aiogram
Beta Was this translation helpful? Give feedback.
All reactions