Skip to content

Conversation

@antdking
Copy link
Contributor

@antdking antdking commented Apr 22, 2021

Issue: #290

Description of changes:

This makes the sqla-core plugin aware of how to compile a database specific query.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

fixes: #290

@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2021

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.89%. Comparing base (414313a) to head (7347cd6).
Report is 156 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #291      +/-   ##
==========================================
+ Coverage   79.81%   79.89%   +0.07%     
==========================================
  Files          84       84              
  Lines        3305     3308       +3     
==========================================
+ Hits         2638     2643       +5     
+ Misses        667      665       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@antdking antdking marked this pull request as draft April 28, 2021 10:38
@antdking
Copy link
Contributor Author

antdking commented Apr 28, 2021

I'll restructure this PR after the sqla 1.4 PR is merged, as our test restructures will conflict pretty heavily

@srprash
Copy link
Contributor

srprash commented Apr 28, 2021

@cybojenix Thanks. I'll take a look once it is ready. :)

@antdking antdking marked this pull request as ready for review April 28, 2021 16:03
@antdking
Copy link
Contributor Author

Over to you, @srprash

Copy link
Contributor

@srprash srprash left a comment

Choose a reason for hiding this comment

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

Just a minor comment. Otherwise LGTM! Thanks!

@srprash
Copy link
Contributor

srprash commented Apr 28, 2021

And could you also update the branch? Thanks!

by default it runs 9.4.

We need to use a feature added in 9.5
This makes the sqla-core plugin aware of how to compile a database specific query.

It seems in some cases, we see strings come through (mostly pragma calls when doing 'create_all'),
so do a check to see if the object looks like a SQL Expression object.

Fixes: #290
this reduces duplication of the Engine fixture.
@antdking
Copy link
Contributor Author

Both addressed

@srprash
Copy link
Contributor

srprash commented Apr 28, 2021

Awesome! thanks

@srprash srprash merged commit bfe24c7 into aws:master Apr 28, 2021
Hargrav3s pushed a commit to Gavant/aws-xray-sdk-python that referenced this pull request Mar 22, 2022
…ws#291)

* chore(sqla_core): setup an area to run postgres tests

* fix: run a supported version of postgres in travis

by default it runs 9.4.

We need to use a feature added in 9.5

* feat(sqla-core): Add support for rendering Database Specific queries

This makes the sqla-core plugin aware of how to compile a database specific query.

It seems in some cases, we see strings come through (mostly pragma calls when doing 'create_all'),
so do a check to see if the object looks like a SQL Expression object.

Fixes: aws#290

* fix: remove a spurious 'self' in the fixtures

* chore: make the DB URL injectable

this reduces duplication of the Engine fixture.
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.

Sqlalchemy_core: support stringifying queries for specific backends

3 participants