title: How can I modify the SQL generated by ServiceStack.OrmLite?
body: <p>I want to use <a href="http://www.servicestack.net/" rel="nofollow">ServiceStack's</a> <a href="http://www.servicestack.net/docs/ormlite/ormlite-overview" rel="nofollow">OrmLite</a> in C# to query <a href="https://aws.amazon.com/redshift/" rel="nofollow">AWS RedShift</a>.  AWS RedShift uses the postgresql wire protocol as its query interface, and puts some constraints on the queries that can be run, one of which is that it cannot accept parameterised queries (I've been told; I haven't actually been able to find this <a href="http://docs.aws.amazon.com/redshift/latest/dg/c_unsupported-postgresql-features.html" rel="nofollow">backed up in documentation yet</a>).</p>
  
  <p>So, I am investigating whether it would be possible to use an ORM to generate parameterised SQL, then find/replace in the parameter values.</p>
  
  <p>How can I get access to the SQL generated by OrmLite to then change it before it is run?</p>