-
Notifications
You must be signed in to change notification settings - Fork 321
Open
Description
Hi,
I tried to create a query for MySQL today and found out that regardless I define, the query always looks the same.
Example:
> from pypika import Table, Query, Dialects
> Query.from_('bar', dialect=Dialects.MYSQL).select('foo')
'SELECT "foo" FROM "bar"'
> q = Query.from_('bar').select('foo')
> q.get_sql(dialect=Dialects.MYSQL)
'SELECT "foo" FROM "bar"'
The ony way to get a correct MySQL query is to either use MySQLQuery from pypika.dialects or you use q.get_sql(quote_char='`').
Of course it could be that I may have a wrong understanding of pypika.Dialects, but there's not much explanation out there.
Regards, Thomas
Metadata
Metadata
Assignees
Labels
No labels