Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Description:
= "="
is missing fromorWhere
's function arguments.The interaction between
first
andtake
, and multiple calls oftake
aren't specified. Isfirst
equivalent totake(1)
? If multiple calls are done, do we take the last one or throw an error after the first call?Similarly, the interaction between selecting a column by string and by object are unknown. It is unclear (and not tested) what should happen if both are mixed together.
Okay, but what is the MySQL syntax for all the things that are tested in the kata? This is not very difficult to describe in the kata, and saves everyone from having to know how to write MySQL queries.
The kata description, sample test cases, and test feedback are severely lacking. In its current state, users may end up wasting time on unnecessary trial and error to get the correct format.
For example, for test case #5, what is wrong with the following output and what is the correct output?
SELECT username AS user, password AS pass, first_name FROM posts WHERE cash > 100000 AND username = 'ww' OR first_name = 'walter'
It also rejects:
SELECT username AS user, password AS pass, first_name FROM posts WHERE (cash > 100000) AND (username = 'ww') OR (first_name = 'walter')
The message for this failed test doesn't help:
Should handle multiple wheres correctly, escaping string values, handling different operators and OR conditions