google-code-export / django-pyodbc

Automatically exported from code.google.com/p/django-pyodbc
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Print output of query does not appear to be for SQL Server #109

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set up databases with the primary database as MySQL and the secondary 
database as SQL Server.
1. Create a simple query, such as foos = Foo.objects.all(), where Foo is a 
model that uses the SQL Server database.
2. print out the query: print foos.query

What is the expected output? What do you see instead?
Expected output is query in SQL Server format (column names wrapped in 
brackets). Actual output is query in, I think, MySQL format (column names 
wrapped in `, along with MySQL-specific keywords).

If it's just not possible to have it output correctly, so be it, but it would 
help *greatly* with debugging if we could see, exactly, the SQL being generated 
for a given queryset.

Original issue reported on code.google.com by jordanth...@gmail.com on 6 Jul 2011 at 7:34

GoogleCodeExporter commented 9 years ago
This suggests that somewhere in the code, db.connection is being used.

Original comment by jordanth...@gmail.com on 2 Sep 2011 at 6:13