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 2 update, and bump to 2.0.0 #23

Merged
merged 16 commits into from
Jan 13, 2025
Merged

SQLAlchemy 2 update, and bump to 2.0.0 #23

merged 16 commits into from
Jan 13, 2025

Conversation

RudolfCardinal
Copy link
Owner

No description provided.

@RudolfCardinal RudolfCardinal marked this pull request as draft January 7, 2025 18:02
@RudolfCardinal
Copy link
Owner Author

Also adding some support for Databricks. There is no generic way to convert SQL textual column types to dialect-specific SQLAlchemy column types (sqlalchemy/sqlalchemy#12230). This relates to cardinal_pythonlib.sqlalchemy.schema.get_sqla_coltype_from_dialect_str() and its sub-function, _get_sqla_coltype_class_from_str().

Copy link
Collaborator

@martinburchell martinburchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I've added some pre-commit hooks for blanket and unnecessary #noqas.

There's a pattern we use in the CamCOPS and CRATE tests for database level testing with engines, sessions etc created in conftest.py and injected into a common database test class. We might want to adopt this if these tests start getting slow.

Would it be worth asking the Databricks people about dialect.ischema_names ?

cardinal_pythonlib/sqlalchemy/core_query.py Outdated Show resolved Hide resolved
@RudolfCardinal
Copy link
Owner Author

Have asked at databricks/databricks-sqlalchemy#11

@RudolfCardinal RudolfCardinal marked this pull request as ready for review January 13, 2025 14:45
@RudolfCardinal RudolfCardinal merged commit 296f218 into master Jan 13, 2025
5 checks passed
@RudolfCardinal RudolfCardinal deleted the sqlalchemy2 branch January 13, 2025 14:45
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

Successfully merging this pull request may close these issues.

2 participants