tekumara / fakesnow

Fake Snowflake Connector for Python. Run, mock and test Snowflake DB locally.
Apache License 2.0
83 stars 7 forks source link

fix: ALTER TABLE result output #100

Closed DanCardin closed 4 weeks ago

DanCardin commented 1 month ago

fwiw, I'm attempting to use fakesnow to test alembic migrations of snowflake 😬.

You already have a test for alter table, but sqlalchemy (versus the raw cursor) always calls .description on the results of queries and it was hitting similar issues to issues you've already solved with e.g. CREATE TABLE etc.

I deviated from the pattern a little bit because AlterTable constructs returned ALTERTABLE as the cmd. It seemed somewhat unfortunate to compare exactly against that, but also seemed very likely that other ALTER statements would have the same generic output.

tekumara commented 4 weeks ago

Thanks for this. I've moved the test into test_description_create_alter_drop_table with the related tests, rather than make it a sqlalchemy specific thing.