Escaping knex mysql query statements
<p>I'm fairly new to knex and databases in general, so this is a beginner question.
I found no clear mention in the <a href="http://knexjs.org/" rel="nofollow noreferrer">knex docs</a> about this.
Are non-raw knex queries automatically "safe"?</p>

<p>Secondly, for raw queries, I have several raw statements similar to this:</p>

<pre><code>var condition = _.map(ids, function(id) {
    return '`id`=' + id;
}).join(' OR ');

knex('categories')
    .whereRaw(condition)
    .select('*')
    .catch(_error.bind(null, cb))
    .then(function(res) { ... });
</code></pre>

<p>Would escaping the <code>id</code> in the condition with a function described <a href="https://stackoverflow.com/a/7760578/3248285">here</a> be sufficient to escape that query?
What else to look out fo in such a scenario?</p>