Skip to content
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

UX: Improve situation with weird __table_args__ syntax #142

Open
amotl opened this issue Jun 26, 2024 · 0 comments
Open

UX: Improve situation with weird __table_args__ syntax #142

amotl opened this issue Jun 26, 2024 · 0 comments

Comments

@amotl
Copy link
Member

amotl commented Jun 26, 2024

Problem

Coming from those recent improvements ...

... @seut mentioned that the need to convey special CrateDB table options like that ...

__table_args__ = {
    'crate_"translog.durability"': "'async'",
}

... is very unfortunate from an UX perspective. I agree with that assessment.

Proposal

It would be so nice to be able to write it down like that, right?

__table_args__ = {
    "crate_translog.durability": "async",
}

Thoughts

SQLAlchemy will be the first instance to receive those options, while evaluating the ORM model. We will need to check where it breaks down the line, and whether we can do something to improve on behalf of the dialect implementation, or if there would be a need to improve SQLAlchemy itself to support such edge cases.

Bonus

The documentation about __table_args__ is also a bit thin, and should be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant