Skip to content

Commit 6555931

Browse files
authored
Merge pull request #30 from bdowning/update
Docstrings, various other updates
2 parents 7611a1d + a73c3c2 commit 6555931

8 files changed

Lines changed: 1994 additions & 378 deletions

File tree

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.4.0-alpha-12
2+
current_version = 0.4.0-alpha-13
33
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(-(?P<release>.*)-(?P<build>\d+))?
44
serialize =
55
{major}.{minor}.{patch}-{release}-{build}

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Python tool for slicing and dicing SQL. Its intended target is
44
Postgres with _asyncpg_, though it also includes support for rendering
55
to 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`.
319322
from dataclasses import dataclass, field
320323
from datetime import date
321324
from 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())

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies = [
88
"typing-extensions",
99
]
1010
name = "sql-athame"
11-
version = "0.4.0-alpha-12"
11+
version = "0.4.0-alpha-13"
1212
description = "Python tool for slicing and dicing SQL"
1313
readme = "README.md"
1414

0 commit comments

Comments
 (0)