title: How to use postgres ::date with knex.js
body: <p>I have a column of type <code>timestamp</code>. I need to select all records by given date. In sql it's something like:</p>
  
  <pre><code>select * from "table" where "date"::date = '2015-08-22';
  </code></pre>
  
  <p>I tried following:</p>
  
  <pre><code>db('table').select().where('date::date', '=', date);
  </code></pre>
  
  <p>But this throws error </p>
  
  <blockquote>
    <p>error: select * from "table" where "date::date" = $1 - column "date::date" does not exist</p>
  </blockquote>
  
  <p>because knex place quotes wrong.</p>
  
  <p>Is there any way to perform such query? Or I should use <code>whereRaw</code>?</p>