Snowflake-Labs / django-snowflake

MIT License
59 stars 15 forks source link

instead of last_insert_id, can we set "can_return_columns_from_insert" as False? #71

Closed fhoffa closed 1 year ago

fhoffa commented 1 year ago

I'm wondering if we can delete notes and implementation related to last_insert_id.

I see the main tests accepts databases that set can_return_columns_from_insert to false:

https://github.com/django/django/blob/main/django/db/backends/base/features.py

Which used to be called can_return_id_from_insert:

https://github.com/django/django/blob/7414704e88d73dafbcfbb85f9bc54cb6111439d3/docs/releases/3.0.txt#L417

I see @timgraham was involved with removing last_insert_id from the Postgres implementation in 2017:

https://github.com/django/django/commit/5d9034bc92e9def0785a3b7cd9ca65e284db0191

timgraham commented 1 year ago

This backend inherits BaseDatabaseFeatures and doesn't override the default can_return_columns_from_insert = False. last_insert_id isn't needed if can_return_columns_from_insert = True, but Snowflake doesn't support RETURNING, correct?

timgraham commented 1 year ago

Closing as invalid.