Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
| b7ddfae337 |
3 changed files with 21 additions and 3 deletions
|
|
@ -1,5 +1,14 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.6.0
|
||||||
|
|
||||||
|
👀
|
||||||
|
|
||||||
|
## 0.5.3
|
||||||
|
|
||||||
|
- Added docstring to `SQLAlchemy()`.
|
||||||
|
- More type fixes.
|
||||||
|
|
||||||
## 0.5.2
|
## 0.5.2
|
||||||
|
|
||||||
- Fixed poorly handled merge conflict leaving `.sqlalchemy` modulem unusable
|
- Fixed poorly handled merge conflict leaving `.sqlalchemy` modulem unusable
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ from .validators import matches
|
||||||
from .redact import redact_url_password
|
from .redact import redact_url_password
|
||||||
from .http import WantsContentType
|
from .http import WantsContentType
|
||||||
|
|
||||||
__version__ = "0.5.3-dev34"
|
__version__ = "0.5.3"
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue',
|
'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue',
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,17 @@ from suou.exceptions import NotFoundError
|
||||||
|
|
||||||
class SQLAlchemy:
|
class SQLAlchemy:
|
||||||
"""
|
"""
|
||||||
Drop-in (?) replacement for flask_sqlalchemy.SQLAlchemy()
|
Drop-in (in fact, almost) replacement for flask_sqlalchemy.SQLAlchemy()
|
||||||
eligible for async environments
|
eligible for async environments.
|
||||||
|
|
||||||
|
Notable changes:
|
||||||
|
+ You have to create the session yourself. Easiest use case:
|
||||||
|
|
||||||
|
async def handler (userid):
|
||||||
|
async with db as session:
|
||||||
|
# do something
|
||||||
|
user = (await session.execute(select(User).where(User.id == userid))).scalar()
|
||||||
|
# ...
|
||||||
|
|
||||||
NEW 0.5.0
|
NEW 0.5.0
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue