<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:arial,sans-serif">That&#39;s another great example that I hadn&#39;t even thought of.</span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:arial,sans-serif">- Travis Tilley</span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:arial,sans-serif"><br></span></div><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="font-family:arial,sans-serif">On Fri, Dec 11, 2015 at 7:43 PM, Jason Dusek </span><span dir="ltr" style="font-family:arial,sans-serif">&lt;<a href="mailto:jason.dusek@gmail.com" target="_blank">jason.dusek@gmail.com</a>&gt;</span><span style="font-family:arial,sans-serif"> wrote:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><p style="margin:1.2em 0px!important">One use case for a slightly richer approach to indentation erasure — one that I encounter every day — is inline SQL. If it’s 10 lines or more, it should probably find expression as a <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">VIEW</code> or stored procedure; but queries like this are not unusual:<br></p></span>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248);white-space:pre-wrap;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important;display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248)"><span><span style="color:rgb(51,51,51);font-weight:bold">func</span> <span style="color:rgb(153,0,0);font-weight:bold">findMentions</span><span>(account: String)</span> -&gt; <span style="color:rgb(153,0,0);font-weight:bold">Array</span><span>&lt;String&gt;</span> </span>{
    <span style="color:rgb(51,51,51);font-weight:bold">let</span> db = databaseFactory().findDatabase()
    <span style="color:rgb(51,51,51);font-weight:bold">let</span> q = `​``<span style="color:rgb(68,85,136);font-weight:bold">SELECT</span> array_agg(<a href="http://mentioner.id" target="_blank">mentioner.id</a>)
                 <span style="color:rgb(68,85,136);font-weight:bold">FROM</span> account
                 <span style="color:rgb(68,85,136);font-weight:bold">JOIN</span> mention <span style="color:rgb(68,85,136);font-weight:bold">ON</span> (<a href="http://account.id" target="_blank">account.id</a> = mentioned)
                 <span style="color:rgb(68,85,136);font-weight:bold">JOIN</span> account <span style="color:rgb(68,85,136);font-weight:bold">AS</span> mentioner <span style="color:rgb(68,85,136);font-weight:bold">ON</span> (<a href="http://mentioner.id" target="_blank">mentioner.id</a> = mentioner)
                <span style="color:rgb(68,85,136);font-weight:bold">WHERE</span> account.handle = :<span style="color:rgb(0,128,128)">1</span>
                <span style="color:rgb(68,85,136);font-weight:bold">ORDER</span> <span style="color:rgb(68,85,136);font-weight:bold">BY</span> timestamp <span style="color:rgb(68,85,136);font-weight:bold">DESC</span>
                <span style="color:rgb(68,85,136);font-weight:bold">LIMIT</span> <span style="color:rgb(0,128,128)">1</span>`​``

    <span style="color:rgb(51,51,51);font-weight:bold">return</span> db.query(q).parameterize(account).run()
}
</code></pre>
<p style="margin:1.2em 0px!important">Moving everything below <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);border-radius:3px;display:inline;background-color:rgb(248,248,248)">q</code> seems infelicitous, at best. However, I do see the appeal of basing the rule on the position of the backticks.</p>
<p style="margin:1.2em 0px!important">Best Regards,</p><p style="margin:1.2em 0px!important">Jason Dusek</p></div></blockquote><div> </div></div>
</div></div>