We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cea555a commit 4518c65Copy full SHA for 4518c65
1 file changed
docs/multiple/index.md
@@ -28,6 +28,23 @@ EllarSQLModule.setup(
28
)
29
```
30
31
+## **Configuring Async Databases**
32
+When configuring async databases,
33
+you need to specify the `+asyncpg` or `+aiosqlite` suffix to the database URL in case of SQLite and PostgreSQL respectively.
34
+
35
+For example, to configure an async database, you can use the following configuration:
36
+```python
37
+from ellar_sql import EllarSQLModule
38
39
+EllarSQLModule.setup(
40
+ databases={
41
+ "default": "postgresql+asyncpg:///main",
42
+ "meta": "sqlite+aiosqlite:////path/to/meta.db",
43
+ },
44
+ migration_options={'directory': 'migrations'}
45
+)
46
+```
47
48
## **Defining Models and Tables with Different Databases**
49
50
**EllarSQL** creates **Metadata** and an **Engine** for each configured database.
0 commit comments