Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
add validation in `.offset()` #2908
I believe this test case covers my PR now.
Is there any scenarios that test case cannot cover?
Actually that case looks like that it has been designed so that passing null actually clears the offset, thus it shouldn't show warning. Also in case of warning it should check that warning is actually emitted. It can be done by using custom loggers in test.
Also I would prefer throwing an error instead of warning.
The code of
I tried some tests in Node 8,
So, it does not break using knex.raw as a parameter if the evaluated result of knex.raw can be parsed to int and if that cannot be parse to int, it is invalid input anyway.
I would like to suggest two options for
I understand all this should be backward compatible, but I think it's weird that there's no validation code in contrast with