node-red-nodes/storage/sqlite/locales/ja/sqlite.html

27 lines
3.0 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<script type="text/html" data-help-name="sqlite">
<p>SQLiteデータベースにアクセスする機能を提供します</p>
<p>SQLクエリには本ノードへどの様にクエリを渡すかを設定します</p>
<p><i>msg.topic経由</i> と <i>固定文</i> のSQLクエリは設定したデータベースに対して <b>db.all</b> 操作を実行します。これによって、INSERTSとUPDATES、DELETESを利用できます。性質上、SQLインジェクションに<i>注意してください</i></p>
<p><i>事前定義文</i> SQL <b>db.all</b> 使SQL</p>
<p><i>一括(応答なし)</i> SQLSQL <b>db.exec</b> 使</p>
<p><i>msg.topic経由</i> または <i>一括(応答なし)</i> を用いる時 <code>msg.topic</code> には、データベースに問い合わせるための <i>クエリ</i> が格納されている必要があります</p>
<p>通常の方法や事前定義文を用いる時 <i>クエリ</i> </p>
<p>事前定義文を用いるためには <code>msg.params</code> をオブジェクトとしてパラメータに渡します。例:<br />
<code>msg.params = {<br />
&nbsp;&nbsp;&nbsp;&nbsp;$id:1,<br />
&nbsp;&nbsp;&nbsp;&nbsp;$name:"John Doe"<br />
}</code><br />
パラメータのオブジェクト名は事前定義文に設定したパラメータと一致させる必要があります
もし <code>SQLITE_RANGE: bind or column index out of range</code> というエラーが発生した場合は、バラメータのオブジェクトのキーに$を含めてください。<br />
上の例で用いるSQLクエリは次の様になります: <code>insert into user_table (user_id, user) VALUES ($id, $name);</code></p>
<p>SQLクエリを使用すると <code>msg.payload</code> </p>
<p>通常返されるペイロードは結果の行から成る配列(またはエラー)になります</p>
<p>フルパスやファイル名を含む <code>msg.extension</code> SQLite</p>
<p>ミリ秒単位の再接続タイムアウトは<b>settings.js</b>
<pre>sqliteReconnectTime: 20000,</pre></p>
</script>
<script type="text/html" data-help-name="sqlitedb">
<p>データベースファイルのデフォルトディレクトリはNode-REDプロセスを開始したユーザのホームディレクトリですこれは絶対パスを用いることで変更できます</p>
</script>