Skip to content

Commit

Permalink
v0.2.2
Browse files Browse the repository at this point in the history
### 変更点
- サンプル用(`/test/SQLite3*`)をより分かりやすいコードへ変更
- 日付時刻は `datetime` 型の書式で保存するように修正
  • Loading branch information
natade-jp committed May 30, 2021
1 parent 5283a7e commit 4e11b22
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 14 deletions.
8 changes: 7 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# History

## v0.2.2

### 変更点
- サンプル用(`/test/SQLite3*`)をより分かりやすいコードへ変更
- 日付時刻は `datetime` 型の書式で保存するように修正

## v0.2.1

### 変更点
Expand All @@ -13,4 +19,4 @@
## v0.1.0

### 新規作成
- `SQLite3` 用の `DB``MongoDB` のように操作するクラスを作成 ( `find``count` のみ対応)
- `SQLite3` 用の `DB``MongoDB` のように操作するクラスを作成 ( `find``count` のみ対応)
Binary file modified build/toolbox-wsh.js
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/class/src/SQLite3/SQLite3Type.js~SQLite3Type.html
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ <h3 data-ice="anchor" id="instance-method-toJSDataFromSQLData">
<span class="right-info">


<span data-ice="source"><span><a href="file/src/SQLite3/SQLite3Type.js.html#lineNumber199">source</a></span></span>
<span data-ice="source"><span><a href="file/src/SQLite3/SQLite3Type.js.html#lineNumber207">source</a></span></span>
</span>
</h3>

Expand Down
10 changes: 9 additions & 1 deletion docs/file/src/SQLite3/SQLite3Type.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,15 @@
}
else if(this.normalized_type === &quot;datetime&quot;) {
const date = new Date(x);
return date.getTime().toString();
const date_text = Format.textf(&quot;%04d-%02d-%02d %02d:%02d:%02d&quot;,
date.getUTCFullYear(),
date.getUTCMonth() + 1,
date.getUTCDate(),
date.getUTCHours(),
date.getUTCMinutes(),
date.getUTCSeconds()
);
return &quot;&apos;&quot; + date_text + &quot;&apos;&quot;;
}
console.log(&quot;Error : toSQLDataFromJSData &quot; + x);
return &quot;null&quot;;
Expand Down
6 changes: 3 additions & 3 deletions docs/index.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/source.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">10/10</span></td>
<td style="display: none;" data-ice="size">7311 byte</td>
<td style="display: none;" data-ice="lines">325</td>
<td style="display: none;" data-ice="updated">2021-05-07 14:52:30 (UTC)</td>
<td style="display: none;" data-ice="updated">2021-05-01 09:47:56 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/SQLite3/SQLite3Type.js.html">src/SQLite3/SQLite3Type.js</a></span></td>
<td data-ice="identifier" class="identifiers"><span><a href="class/src/SQLite3/SQLite3Type.js~SQLite3Type.html">SQLite3Type</a></span></td>
<td class="coverage"><span data-ice="coverage">100 %</span><span data-ice="coverageCount" class="coverage-count">8/8</span></td>
<td style="display: none;" data-ice="size">6215 byte</td>
<td style="display: none;" data-ice="lines">257</td>
<td style="display: none;" data-ice="updated">2021-05-07 14:06:38 (UTC)</td>
<td style="display: none;" data-ice="size">6437 byte</td>
<td style="display: none;" data-ice="lines">265</td>
<td style="display: none;" data-ice="updated">2021-05-01 10:14:07 (UTC)</td>
</tr>
<tr data-ice="file">
<td data-ice="filePath"><span><a href="file/src/toolbox-wsh.js.html">src/toolbox-wsh.js</a></span></td>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "toolbox-wsh",
"version": "0.2.1",
"version": "0.2.2",
"description": "This is a library that works with specific external applications using WSH.",
"author": "natade-jp <natade3@gmail.com> (https://github.com/natade-jp)",
"repository": {
Expand Down
10 changes: 9 additions & 1 deletion src/SQLite3/SQLite3Type.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,15 @@ export default class SQLite3Type {
}
else if(this.normalized_type === "datetime") {
const date = new Date(x);
return date.getTime().toString();
const date_text = Format.textf("%04d-%02d-%02d %02d:%02d:%02d",
date.getUTCFullYear(),
date.getUTCMonth() + 1,
date.getUTCDate(),
date.getUTCHours(),
date.getUTCMinutes(),
date.getUTCSeconds()
);
return "'" + date_text + "'";
}
console.log("Error : toSQLDataFromJSData " + x);
return "null";
Expand Down
Binary file modified test/SQLiteTest.db
Binary file not shown.
Binary file modified test/SQLiteTest.js
Binary file not shown.

0 comments on commit 4e11b22

Please sign in to comment.