Open Sekhmet opened 2 years ago
In some cases knex might be used through a helper function that uses different name than any of predefined ones (raw, joinRaw, whereRaw).
In this case allowing users to add different function names can be useful.
For example
db.wrapQuery = (query) => (...args) => knex.query(query, args) const getUserById = db.wrapQuery('select * from ' + table + ' where id = ?')
In some cases knex might be used through a helper function that uses different name than any of predefined ones (raw, joinRaw, whereRaw).
In this case allowing users to add different function names can be useful.
For example