-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support computed columns in SQLAlchemy ORM #474
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Niklas,
thank you very much for this excellent contribution. Can I humbly ask you to add a short section about the usage of this feature to the documentation at docs/sqlalchemy.rst?
I think another subsection within the Table definition section 1 would be the right place, just like the "``_id`` as primary key" section. While being at it, feel free to add corresponding anchors like .. _table-definition:
to those subsections as well.
I think it will be enough to just demonstrate the example from the test case there, showing off the entity schema together with a few words of prose.
class DummyTable(self.Base):
__tablename__ = 't'
ts = sa.Column(sa.BigInteger, primary_key=True)
p = sa.Column(sa.BigInteger, sa.Computed("date_trunc('day', ts)"))
Thank you in advance and with kind regards,
Andreas.
Footnotes
d22aa30
to
bcf565f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bcf565f
to
6757f7f
Compare
Summary of the changes / Why this is an improvement
Fixes crate/sqlalchemy-cratedb#112
Checklist