File tree Expand file tree Collapse file tree 6 files changed +8
-3
lines changed
Expand file tree Collapse file tree 6 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ <h2 id="why">Why?</h2>
6262< p > To fix this we have to assign it:</ p >
6363< pre > < code class ="language-py "> statement = statement.where(...)
6464</ code > </ pre >
65- < p > This can be a bit verbose though not the worst issue. By using implace < code > |=</ code > we can avoid this issue without making the statement mutable.</ p >
65+ < p > This can be a bit verbose though not the worst issue. By using implace < code > |=</ code > we can avoid this issue
66+ without making the statement mutable.</ p >
6667< p > It's also just a fun syntax to play with.</ p >
6768</ section >
6869< section >
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ <h1 class="title">Module <code>sqlalchemy_builder.select</code></h1>
4444stmt = select(MyModel) | where(MyModel.x == 1)
4545stmt |= order_by(MyModel.id)
4646</ code > </ pre >
47+ < p > NOTE: Only use with base < code > select</ code > , < code > GenerativeSelect</ code > and < code > CompoundSelect</ code > may not work correctly.</ p >
4748< p > The following sqlalchemy operations are available:</ p >
4849< ul >
4950< li > < a href ="https://docs.sqlalchemy.org/en/20/core/selectable.html#sqlalchemy.sql.expression.Select.where "> where</ a > </ li >
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44
55[project ]
66name = " sqlalchemy-builder"
7- version = " 0.1.0 "
7+ version = " 0.1.1 "
88authors = [{ name = ' Jamie Chang' , email = ' jamie.cheng.chang@gmail.com' }]
99maintainers = [{ name = ' Jamie Chang' , email = ' jamie.cheng.chang@gmail.com' }]
1010description = " Build SQLAlchemy statements avoiding common footguns."
Original file line number Diff line number Diff line change 3838statement = statement.where(...)
3939```
4040
41- This can be a bit verbose though not the worst issue. By using implace `|=` we can avoid this issue without making the statement mutable.
41+ This can be a bit verbose though not the worst issue. By using implace `|=` we can avoid this issue
42+ without making the statement mutable.
4243
4344It's also just a fun syntax to play with.
4445
Original file line number Diff line number Diff line change 1010stmt |= order_by(MyModel.id)
1111```
1212
13+ NOTE: Only use with base `select`, `GenerativeSelect` and `CompoundSelect` may not work correctly.
14+
1315The following sqlalchemy operations are available:
1416
1517- [where](https://docs.sqlalchemy.org/en/20/core/selectable.html#sqlalchemy.sql.expression.Select.where)
You can’t perform that action at this time.
0 commit comments