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

Database independent testing query #9

Open
jor-rit opened this issue Mar 4, 2020 · 0 comments
Open

Database independent testing query #9

jor-rit opened this issue Mar 4, 2020 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@jor-rit
Copy link
Contributor

jor-rit commented Mar 4, 2020

Replace the current 'SELECT 1' query, with a database independent solution. 'SELECT 1' does not work on backends like Oracle and DB2.

This is a follow-up on #8.

Proposal

Django's database API has an is_usable method, implemented by all backends that abstracts away this query (for example it does SELECT 1 query on PostgreSQL and connection.ping() on MySQL).
So let's reuse that. Means getting the backend from django.db.connections, creating a connection, and calling the is_usable() method.

Using django.db.connections would also be a first step to being implementing #4.

@bittner bittner added the help wanted Extra attention is needed label Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants