haxetink / tink_sql

SQL embedded into Haxe
MIT License
53 stars 16 forks source link

Unmatched left/right join no longer returns null field? #101

Closed kevinresol closed 4 years ago

kevinresol commented 4 years ago

Sorry I am a bit of hurry so not yet have time to investigate further. Just to jot down my guess here. In the past a join, e.g.: db.foo.leftJoin(db.bar) will return row.bar == null if there is no match. But I think now it seems to be row.bar == {field1: null, field2: null}.

If that is the case it is a breaking change...

benmerckx commented 4 years ago

It's an oversight. Or rather it was unspecified before? We left most of the nesting to the driver before. The change comes from selecting every field and then reassembling the nested response. It can be reintroduced.

kevinresol commented 4 years ago

I think that we have to reintroduce it, it broke my server silently. But is it difficult to determine that per current architecture?

benmerckx commented 4 years ago

It was defined in the node mysql driver here (link since I missed this somehow):

https://github.com/haxetink/tink_sql/blob/f99e86b597996011b718606d923436556a3157e2/src/tink/sql/drivers/node/MySql.hx#L175-L185

Should be consistent across drivers now