Feat: Implement create_table_if_not_exists#415
Conversation
3616462 to
ef96baf
Compare
ef96baf to
29e6374
Compare
|
I think we should have some more discussion around this. I would prefer to have, analog to SQL, a |
This feels analogous to the SQL |
|
Exactly, this implements If you prefer to have a new method |
|
@hussein-awala Thanks! You're right, and I think |
|
I will update the PR then 👍 |
create_table_if_not_exists
|
I think it's ready 🤞 |
| assert "Table already exists" in str(e.value) | ||
|
|
||
|
|
||
| def test_create_table_if_not_exists_200( |
There was a problem hiding this comment.
Nice! It would have been easier to write an integration test, but great job on the mocking 👍
Fokko
left a comment
There was a problem hiding this comment.
@hussein-awala This looks great, thanks!
* Feat: Add fail_if_exists param to create_table * create create_table_if_not_exists method * fix reset test * fix mypy check
closes: #406
This PR implements the
create_table_if_not_existsmethod to create the table if it doesn't exist, and return the existing table if it exists instead of raising aTableAlreadyExistsErrorexception.