mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-19 22:50:13 +08:00
25 lines
940 B
HTML
25 lines
940 B
HTML
---
|
|
layout: docs
|
|
title: SortOrder
|
|
---
|
|
|
|
<h2>Summary</h2>
|
|
|
|
<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>
|
|
<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) ->
|
|
</code></pre>
|
|
</p>
|
|
</div>
|
|
|
|
<ul>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|