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

SQLAlchemy Core support #85

Open
glyph opened this issue Mar 28, 2024 · 0 comments
Open

SQLAlchemy Core support #85

glyph opened this issue Mar 28, 2024 · 0 comments

Comments

@glyph
Copy link
Owner

glyph commented Mar 28, 2024

While initially designed for plain SQL, DBXS's organizational idiom can be equally useful with an expression AST such as SQLAlchemy Core. Although SQL injection is not a concern with SQLAlchemy Core as it will properly quote anything in its AST (as long as you don't use sqlalchemy.text), idiomatic use of inline SQLAlchemy expressions leads to lots of duplicative re-building of the same structures, both in Python and within the database driver, where small variances might bust the prepared-statement cache in some database drivers.

A DBXS interface to SQLAlchemy Core could ensure that idiomatic queries use proper bind parameters rather than ad-hoc literal inlining. In turn, SQLAlchemy Core can provide many of its features — for example, validated database-portable SQL rendering, for applications that do really have a requirement for multiple DB backends — to DBXS applications.

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