Snowflake-Labs / django-snowflake

MIT License
59 stars 15 forks source link

Switch to upper case identifiers #39

Closed timgraham closed 2 years ago

timgraham commented 2 years ago

Fixes #35

timgraham commented 2 years ago

@taylor-cedar, this isn't completely polished but please apply the patch to your install and see if it allows you to proceed with your testing.

taylor-cedar commented 2 years ago

Hey Tim, I tested this change and I am seeing errors only with DEBUG=True. DEBUG=False seems to work great.

 File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 126, in __exit__
    next(self.gen)
  File "/Users/thakes/code/test_django/env/lib/python3.9/site-packages/django/db/backends/utils.py", line 113, in debug_sql
    sql = self.db.ops.last_executed_query(self.cursor, sql, params)
  File "/Users/thakes/code/test_django/django_snowflake/operations.py", line 133, in last_executed_query
    return cursor.query
AttributeError: 'SnowflakeCursor' object has no attribute 'query'
timgraham commented 2 years ago

You must use snowflake-connector-python 2.7.2 or later to fix that (as per the CHANGELOG).

taylor-cedar commented 2 years ago

@timgraham Nice! Working perfectly now with 2.7.2.