Mailspring/docs/SortOrder.html

22 lines
1 KiB
HTML
Raw Normal View History

2015-10-03 01:57:40 +08:00
---
layout: docs
title: SortOrder
edit_url: "https://github.com/nylas/N1/blob/master/src/flux/attributes/sort-order.coffee"
2015-10-03 01:57:40 +08:00
---
2015-10-02 03:34:16 +08:00
2015-10-03 01:57:40 +08:00
<h2>Summary</h2>
2015-10-02 03:34:16 +08:00
2015-10-03 01:57:40 +08:00
<div class="markdown-from-sourecode">
<p><p>Represents a particular sort direction on a particular column. You should not
instantiate SortOrders manually. Instead, call <a href='Attribute.html#ascending'>Attribute::ascending</a> or
<a href='Attribute.html#descending'>Attribute::descending</a> to obtain a sort order instance:</p>
2015-10-02 03:34:16 +08:00
<pre><code class="lang-coffee">DatabaseStore.<span class="hljs-function"><span class="hljs-title">findBy</span><span class="hljs-params">(Message)</span></span>
.<span class="hljs-function"><span class="hljs-title">where</span><span class="hljs-params">({threadId: threadId, draft: false})</span></span>
.<span class="hljs-function"><span class="hljs-title">order</span><span class="hljs-params">(Message.attributes.date.descending()</span></span>)<span class="hljs-class">.then</span> (messages) -&gt;
</code></pre>
</p>
</div>
2015-10-03 01:57:40 +08:00
<ul>
</ul>