title: Knex + Postgresql + node - how to call postgresql functions for selected columns
body: <p>I want to check record exists or not in postgresql and need result in boolean.</p>
  
  <p><strong>NOTE :</strong> I know there are simple ways with if else check but what I want is the representation in knex for the query I listed. I also know this is complex but just wants to learn.</p>
  
  <p>I know the query, You can see here below,</p>
  
  <pre><code>select exists(select 1 from test where id = XYZ);
  </code></pre>
  
  <p>How can I write this postgresql query with knex? </p>
  
  <p>I tried this way but it is not working.</p>
  
  <pre><code>knex.raw(`SELECT exists(${knex(TABLE_NAME).where(CONDITIONS).select('1').toString()})`)
  </code></pre>