Closed Komalis closed 1 month ago
Do you need to diff against empty tables in a real use-case, or is it just for tests?
Yes i need to diff against empty tables in a real use case, it's even more useful because sometimes I use the "where" argument, which gives make an empty result, and it is expected.
That makes sense!
Would adding a --allow-empty
flag be a good enough solution for you?
p.s. I think that error on empty probably wasn't the best design choice. Maybe in some future version I'll remove it completely.
Do you need to diff against empty tables in a real use-case, or is it just for tests?
Yes i need to diff against empty tables in a real use case, it's even more useful because sometimes I use the "where" argument, which gives make an empty result, and it is expected.
That makes sense!
Would adding a
--allow-empty
flag be a good enough solution for you?
Yes it would be very useful! 🙏
@Komalis I have an initial implementation in PR #22 .
You're welcome to try it. Just don't forget to upgrade sqeleton to 0.1.5
I'll some tests and documentation soon.
Here is a quick example on why we can't use reladiff on empty tables.
Following : https://github.com/erezsh/sqeleton/issues/16
Then
or with a python script
The behaviour that I was expecting is that reladiff tells me that the diff is
or
Depending on which table we are doing the compare.