title: Is there any way to bind parameter in select section for TypeORM?
body: <p>I am trying to implement search with <code>pg_trgm</code> module in PostgreSQL on project written with TypeScript and TypeOrm.
  SQL what works for me looks like this:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT t, similarity(t, 'word') AS sml
    FROM test_trgm
    WHERE t % 'word'
    ORDER BY sml DESC, t;
  </code></pre>
  
  <p>But when I started integrate it in my builder I realize that that I can't protect select statement from SQL injection since TypeOrm doesn't offer to bind parameter in any of select methods (such as <code>SelectQueryBuilder::addSelect</code>, <code>SelectQueryBuilder::select</code>).</p>
  
  <p>Example of my vulnerable method:</p>
  
  <pre><code>...
  applySearch(builder: SelectQueryBuilder&lt;any&gt;, needle: string) {
      if (needle) {
        builder.addSelect(`similarity(title, ${needle})`);
        builder.andWhere('title % :needle', { needle });
      }
    }
  ...
  </code></pre>
  
  <p>Maybe somebody know better way to realize this search in my technology stack?</p>