I disagree. Knex isn't an abstraction over SQL itself, as much as an abstraction over the tedious process of writing literal strings, which let's the developer treat SQL queries as code.
My process is generally - write SQL to find the best query, then convert the SQL to Knex for integration.
As a simple example, say you are making a simple query to the db, but in some edge cases you need another column to be selected. Knex lets you do this:
My process is generally - write SQL to find the best query, then convert the SQL to Knex for integration.
As a simple example, say you are making a simple query to the db, but in some edge cases you need another column to be selected. Knex lets you do this:
Which naturally compiles into either or