mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
41 lines
2.4 KiB
HTML
41 lines
2.4 KiB
HTML
<!--
|
||
Copyright JS Foundation and other contributors, http://js.foundation
|
||
|
||
Licensed under the Apache License, Version 2.0 (the "License");
|
||
you may not use this file except in compliance with the License.
|
||
You may obtain a copy of the License at
|
||
|
||
http://www.apache.org/licenses/LICENSE-2.0
|
||
|
||
Unless required by applicable law or agreed to in writing, software
|
||
distributed under the License is distributed on an "AS IS" BASIS,
|
||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
See the License for the specific language governing permissions and
|
||
limitations under the License.
|
||
-->
|
||
|
||
<script type="text/x-red" data-help-name="sort">
|
||
<p>メッセージ列もしくは配列型のペイロードをソートします。</p>
|
||
<p><b>split</b>ノードと組み合わせてメッセージの並べ替えを行うことができます。</p>
|
||
<p>ソート順序は以下が指定可能です。</p>
|
||
<ul>
|
||
<li><b>昇順</b></li>
|
||
<li><b>降順</b></li>
|
||
</ul>
|
||
<p>数値による並べ替えを選択することもできます。</p>
|
||
<p>メッセージの並べ替えを行うためのソートキーは<code>payload</code>プロパティもしくはJSONata式が利用できます。配列型ペイロードのソートキーには、要素値もしくはJSONata式が利用できます。</p>
|
||
<p>sortノードの処理では受信したメッセージが<code>msg.parts</code>プロパティを持っていることを想定しています。splitノードでこのプロパティを生成することが可能ですが、独自に生成しても構いません。<code>parts</code>プロパティは以下のプロパティを含みます。</p>
|
||
<p>
|
||
<ul>
|
||
<li><code>id</code> - メッセージグループの識別子</li>
|
||
<li><code>index</code> - グループ内の順番</li>
|
||
<li><code>count</code> - グループを構成するメッセージの数</li>
|
||
</ul>
|
||
</p>
|
||
<p><b>注:</b> このノードの処理ではメッセージを内部に蓄積します。以下により蓄積するメッセージの最大数を指定することで、予期しないメモリ使用量の増大を防ぐことができます。デフォルトではメッセージ数を制限しません。
|
||
<ul>
|
||
<li><b>settings.js</b>の<code>nodeMessageBufferMaxLength</code>プロパティ</li>
|
||
</ul>
|
||
</p>
|
||
</script>
|