fix coverage, bump version, update relaese, update docs
This commit is contained in:
@ -38,7 +38,36 @@ Current options are:
|
||||
**Arguments**:
|
||||
|
||||
- `new_model (Model class)`: newly constructed Model
|
||||
- `model_fields (Union[Dict[str, type], Dict])`:
|
||||
- `model_fields (Union[Dict[str, type], Dict])`: dict of model fields
|
||||
|
||||
<a name="models.helpers.models.substitue_backend_pool_for_sqlite"></a>
|
||||
#### substitue\_backend\_pool\_for\_sqlite
|
||||
|
||||
```python
|
||||
substitue_backend_pool_for_sqlite(new_model: Type["Model"]) -> None
|
||||
```
|
||||
|
||||
Recreates Connection pool for sqlite3 with new factory that
|
||||
executes "PRAGMA foreign_keys=1; on initialization to enable foreign keys.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `new_model (Model class)`: newly declared ormar Model
|
||||
|
||||
<a name="models.helpers.models.check_required_meta_parameters"></a>
|
||||
#### check\_required\_meta\_parameters
|
||||
|
||||
```python
|
||||
check_required_meta_parameters(new_model: Type["Model"]) -> None
|
||||
```
|
||||
|
||||
Verifies if ormar.Model has database and metadata set.
|
||||
|
||||
Recreates Connection pool for sqlite3
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `new_model (Model class)`: newly declared ormar Model
|
||||
|
||||
<a name="models.helpers.models.extract_annotations_and_default_vals"></a>
|
||||
#### extract\_annotations\_and\_default\_vals
|
||||
|
||||
@ -30,6 +30,8 @@ nested models in result.
|
||||
|
||||
**Arguments**:
|
||||
|
||||
- `current_relation_str (str)`: name of the relation field
|
||||
- `source_model (Type[Model])`: model on which relation was defined
|
||||
- `row (sqlalchemy.engine.result.ResultProxy)`: raw result row from the database
|
||||
- `select_related (List)`: list of names of related models fetched from database
|
||||
- `related_models (Union[List, Dict])`: list or dict of related models
|
||||
|
||||
@ -21,6 +21,10 @@ for sqlite backend, meaning that each querry is run with a new connection and th
|
||||
This is changed in `ormar` since >=0.9.0 and by default each sqlite3 query has `"PRAGMA foreign_keys=1;"`
|
||||
run so now each sqlite3 connection by default enforces ForeignKey constraints including cascades.
|
||||
|
||||
## Other
|
||||
|
||||
* Update api docs.
|
||||
* Add tests for fk creation in db and for cascades in db
|
||||
|
||||
# 0.8.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user