@@ -4,6 +4,9 @@ Python tool for slicing and dicing SQL. Its intended target is
44Postgres with _ asyncpg_ , though it also includes support for rendering
55to a SQLAlchemy ` TextClause ` .
66
7+ _ Note that current docstrings are autogenerated and have not been
8+ carefully reviewed; take them with a grain of salt!_
9+
710## Base query builder
811
912### Example
@@ -319,9 +322,9 @@ Requires SQLAlchemy to be installed, otherwise raises `ImportError`.
319322from dataclasses import dataclass, field
320323from datetime import date
321324from uuid import UUID , uuid4
322- from typing import Optional
325+ from typing import Annotated, Optional
323326
324- from sql_athame import ModelBase, model_field_metadata as MD , sql
327+ from sql_athame import ModelBase, ColumnInfo , sql
325328
326329
327330@dataclass
@@ -330,7 +333,7 @@ class Person(ModelBase, table_name="people", primary_key="id"):
330333 name: str
331334 birthday: date
332335 title: Optional[str ] = None
333- extra: Optional[dict ] = field( default = None , metadata = MD (type = " JSONB" ))
336+ extra: Optional[Annotated[ dict , ColumnInfo (type = " JSONB" )]] = None
334337
335338
336339>> > list (Person.create_table_sql())
0 commit comments