After days of struggling to write SQL in Knex/Bookshelf for NodeJS, I decided to give up and just write raw SQL queries.
Both Bookshelf and Knex’s documentation are outdated, it seems. A lot of the methods I tried to use usually spew “method doesn’t exist” errors, and I spent most of my time just figuring out how to get the method to work rather than test for query results. That was just plain frustrating.