Harmless select in case of invalid insert attempt#203
Conversation
|
Wow that was fast :D Looking great - I'll try it out later tonight |
There was a problem hiding this comment.
Removing fix placed in #197 which inserts default values.
|
Off! Sorry for that break. Let me know if this looks good to y'all & I'll merge it & push out a new fix asap. |
|
Also - I'm fine with a breaking change if that will make the query do the right thing ™️ |
|
@Hiteshm01 @brianc this is fully backward compatible and fast now :D @brianc I'm afraid that there is no right way. What would the correct behavior be for an insert query that is passed an empty list of objects? I would say its inserting nothing at all, which is what this patch does. Its not an insert query however - SQL doesn't support an insert query that inserts nothing at all, so thats not ideal. The closest is a query that inserts a row with default values... which doesn't really make sense to me for an empty array argument. Which one do you think makes more sense? |
|
@Hiteshm01 Agreed - I'll merge it & push out a new minor version right now containing this fix and this epic PR giving us support for mssql. I really appreciate you and @spion helping to shepherd this issue through and lend clarity to it. |
Harmless select in case of invalid insert attempt
Regarding #197, As suggested by @spion This patch will override previous fix and will return with harmless select statement with "WHERE (1=2)"