mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-02 09:26:12 +08:00
18 lines
324 B
Python
18 lines
324 B
Python
from typing import Any
|
|
|
|
from sqlalchemy.orm import DeclarativeBase
|
|
|
|
|
|
class NBESFVerMatchErr(Exception): ...
|
|
|
|
|
|
class NBESFParseErr(Exception): ...
|
|
|
|
|
|
def row2dict(row: DeclarativeBase) -> dict[str, Any]:
|
|
d = {}
|
|
for column in row.__table__.columns:
|
|
d[column.name] = str(getattr(row, column.name))
|
|
|
|
return d
|