36 lines
622 B
Markdown
36 lines
622 B
Markdown
# Examples
|
|
|
|
All examples are located in the [`examples/`](https://github.com/OlegYurchik/metaorm/tree/main/examples) directory and can be run directly:
|
|
|
|
```bash
|
|
PYTHONPATH=. .venv/bin/python examples/basic_usage.py
|
|
```
|
|
|
|
## Basic Usage
|
|
|
|
--8<-- "examples/basic_usage.py"
|
|
|
|
## DTO Usage
|
|
|
|
--8<-- "examples/dto_usage.py"
|
|
|
|
## Transactions
|
|
|
|
--8<-- "examples/transactions.py"
|
|
|
|
## Nested Transactions
|
|
|
|
--8<-- "examples/nested_transactions.py"
|
|
|
|
## Filters, Pagination & Sorting
|
|
|
|
--8<-- "examples/filter_usage.py"
|
|
|
|
## Eager Loading
|
|
|
|
--8<-- "examples/relationships.py"
|
|
|
|
## Multi-Repo Transactions
|
|
|
|
--8<-- "examples/container_usage.py"
|