{"id":17036,"date":"2021-09-03T18:33:39","date_gmt":"2021-09-03T09:33:39","guid":{"rendered":"https:\/\/itport.cloud\/?p=17036"},"modified":"2021-09-03T18:33:40","modified_gmt":"2021-09-03T09:33:40","slug":"post-17036","status":"publish","type":"post","link":"https:\/\/itport.cloud\/?p=17036","title":{"rendered":"(\u7b2c4\u56de)Electron\u3067\u30af\u30ed\u30b9\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u958b\u767a\u3057\u3088\u3046\uff08\u88fd\u9020\u7de8\u2462\uff09"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"e79baee6aca1-1\">\u76ee\u6b21<\/h2>\n\n\n\n<p><a href=\"#1\">\u306f\u3058\u3081\u306b<\/a><br><a href=\"#2\">NeDB<\/a><br><a href=\"#3\">NeDB\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/a><br><a href=\"#4\">DB\u3078\u306e\u4fdd\u5b58<\/a><br><a href=\"#5\">\u4fdd\u5b58\u30c7\u30fc\u30bf\u306e\u8868\u793a<\/a><br><a href=\"#7\">\u6b21\u56de\u4e88\u544a<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"1\">\u306f\u3058\u3081\u306b<\/h2>\n\n\n\n<p>\u524d\u56de\u306f\u3001jKanban\u3092\u4f7f\u7528\u3057\u3066\u304b\u3093\u3070\u3093\u30a2\u30d7\u30ea\u306e\u753b\u9762\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<br>\u4eca\u56de\u306f\u3001\u30bf\u30b9\u30af\u306e\u4fdd\u5b58\u3068\u4fdd\u5b58\u30c7\u30fc\u30bf\u306e\u8868\u793a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2\">NeDB<\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u30bf\u30b9\u30af\u3092\u4fdd\u5b58\u3057\u3066\u3001\u6b21\u56de\u8d77\u52d5\u6642\u306b\u4fdd\u5b58\u3057\u305f\u30bf\u30b9\u30af\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u306e\u3067\u3001NeDB\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<br>NeDB\u306fJavaScript\u3067\u52d5\u4f5c\u3059\u308b\u7d44\u307f\u8fbc\u307f\u7528\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u3001\u5225\u9014DB\u7528\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u4e0d\u8981\u3067JavaScript\u3092\u5b9f\u884c\u3067\u304d\u308b\u74b0\u5883\u3067\u3042\u308c\u3070\u52d5\u4f5c\u3057\u307e\u3059\u3002<br>NeDB\uff1a<a href=\"https:\/\/github.com\/louischatriot\/nedb\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (\u65b0\u3057\u3044\u30bf\u30d6\u3067\u958b\u304f)\">https:\/\/github.com\/louischatriot\/nedb<\/a><\/p>\n\n\n\n<p> \u203bNeDB\u306f2015\u5e74\u304b\u3089\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u305b\u3093\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002 <\/p>\n\n\n\n<p>\u307e\u305a\u306f\u3001 NeDB\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306bnpm install\u3067\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002 <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nnpm install nedb\n<\/pre><\/div>\n\n\n<p> \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u5b9f\u969b\u306bDB\u3092\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002 <br> NeDB\u3067\u306f\u30a4\u30f3\u30e1\u30e2\u30ea\u3068DB\u30d5\u30a1\u30a4\u30eb\u306e2\u30d1\u30bf\u30fc\u30f3\u306e\u5229\u7528\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<br> \u4eca\u56de\u306f\u3001\u30c4\u30fc\u30eb\u3092\u518d\u8d77\u52d5\u3057\u3066\u3082\u30c7\u30fc\u30bf\u3092\u4fdd\u6301\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u5f62\u5f0f\u3067DB\u3092\u7528\u610f\u3057\u307e\u3059\u3002<br> \u4e0b\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u30e1\u30a4\u30f3\u753b\u9762\uff08index.html\uff09\u306b\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u3001\u5b9f\u884c\u30d5\u30a1\u30a4\u30eb\u3068\u540c\u968e\u5c64\u306bdata\u30d5\u30a9\u30eb\u30c0\u3092\u4f5c\u6210\u3057\u3001kanban.nedb\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u81ea\u52d5\u3067\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002 <br><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nconst db = new Datastore({ filename: 'kanban.nedb', autoload: true })\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"3\">NeDB\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h2>\n\n\n\n<p> NeDB\u306eAPI\u306fMongoDB\u306eAPI\u306e\u30b5\u30d6\u30bb\u30c3\u30c8\u306a\u306e\u3067\u3001MongoDB\u3068\u540c\u3058\u4f7f\u3044\u65b9\u304c\u3067\u304d\u307e\u3059\u3002 <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"e8bfbde58aa0-2\">\u8ffd\u52a0<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\ndb.insert(doc)\ndb.insert(doc, (error, newDoc) => {})\n<\/pre><\/div>\n\n\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8ffd\u52a0\u3059\u308b\u5834\u5408\u306f\u3001<strong>insert<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<br><strong>doc<\/strong>\u3000\u8ffd\u52a0\u3059\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3002\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6307\u5b9a\u3057\u307e\u3059<br><strong>newDoc<\/strong>\u3000DB\u767b\u9332\u5f8c\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u30a2\u30eb\u30d5\u30a1\u30d9\u30c3\u30c816\u6587\u5b57\u304b\u3089\u306a\u308b<strong>_id<\/strong>\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3044\u307e\u3059<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"e69bb4e696b0-3\">\u66f4\u65b0<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\ndb.update(query, doc, option, (error, numOfDocs) =>{});\n<\/pre><\/div>\n\n\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u66f4\u65b0\u3059\u308b\u5834\u5408\u306f\u3001<strong>update<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<br><strong>query\u3000<\/strong>\u66f4\u65b0\u5bfe\u8c61\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u6307\u5b9a\u3000 \u6b63\u898f\u8868\u73fe\u306b\u3088\u3063\u3066\u90e8\u5206\u4e00\u81f4\u306a\u3069\u3082\u53ef\u80fd <br>\u3000\u3000\u3000\u3000\u4f8b\u3000ID\u3092\u6307\u5b9a\u3057\u3066\u691c\u7d22\u3059\u308b\u5834\u5408\u306f<strong>var query = {_id:&#8221;xxxxxxxxxxxxxxxx&#8221;}\u3000<\/strong> \u306e\u3088\u3046\u306b\u3057\u307e\u3059 <br><strong>doc\u3000<\/strong>\u66f4\u65b0\u3059\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3000insert\u3068\u540c\u69d8\u306b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6307\u5b9a\u3059\u308b<br><strong>option\u3000<\/strong>\u8907\u6570\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u66f4\u65b0\u3001\u4e00\u81f4\u3059\u308b\u3082\u306e\u304c\u306a\u3044\u5834\u5408\u306b\u66f4\u65b0\u306a\u3069\u3067\u5229\u7528\u3000\u4eca\u56de\u306f\u4f7f\u7528\u3057\u307e\u305b\u3093<br><strong>numOfDocs\u3000<\/strong>\u66f4\u65b0\u3057\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u4ef6\u6570\u304c\u8fd4\u3063\u3066\u304d\u307e\u3059<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"e5898ae999a4-4\">\u524a\u9664<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\ndb.remove(query, options, (error, numOfDocs) => {})\n<\/pre><\/div>\n\n\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u66f4\u65b0\u3059\u308b\u5834\u5408\u306f\u3001<strong>remove<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<br><strong>query\u3000<\/strong>\u524a\u9664\u5bfe\u8c61\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u6307\u5b9a<br><strong>options\u3000<\/strong>\u8907\u6570\u524a\u9664\u3067\u5229\u7528 <br><strong>numOfDocs\u3000<\/strong>\u66f4\u65b0\u3057\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u4ef6\u6570\u304c\u8fd4\u3063\u3066\u304d\u307e\u3059 <\/p>\n\n\n\n<p><strong>query\u3000<\/strong>\u524a\u9664\u5bfe\u8c61\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u6307\u5b9a<br><strong>options\u3000<\/strong>\u8907\u6570\u524a\u9664\u3067\u5229\u7528 <br><strong>numOfDocs\u3000<\/strong>\u66f4\u65b0\u3057\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u4ef6\u6570\u304c\u8fd4\u3063\u3066\u304d\u307e\u3059 <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"e6a49ce7b4a2-5\">\u691c\u7d22<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\ndb.find(query, (error, docs){})\ndb.findOne(query, (error, doc){})\n<\/pre><\/div>\n\n\n<p>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u691c\u7d22\u3059\u308b\u5834\u5408\u306f\u3001<strong>find<\/strong>\u307e\u305f\u306f<strong>findOne<\/strong>\u3092\u4f7f\u3044\u307e\u3059\u3002<br><strong> find\u3000<\/strong>\u30af\u30a8\u30ea\u306b\u4e00\u81f4\u3059\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8fd4\u3059 <br><strong>query\u3000<\/strong>\u691c\u7d22\u5bfe\u8c61\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u6307\u5b9a \u3000 \u6b63\u898f\u8868\u73fe\u306b\u3088\u3063\u3066\u90e8\u5206\u4e00\u81f4\u306a\u3069\u3082\u53ef\u80fd <br>\u3000\u3000\u3000\u3000\u4f8b\u3000ID\u3092\u6307\u5b9a\u3057\u3066\u691c\u7d22\u3059\u308b\u5834\u5408\u306f<strong>var query = {_id:&#8221;xxxxxxxxxxxxxxxx&#8221;}\u3000<\/strong> \u306e\u3088\u3046\u306b\u3057\u307e\u3059 <br><strong>findOne\u3000<\/strong>\u30af\u30a8\u30ea\u306b\u4e00\u81f4\u3057\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u3046\u3061\u3001\uff11\u3064\u3092\u8fd4\u3059<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"4\">DB\u3078\u306e\u4fdd\u5b58<\/h2>\n\n\n\n<p>NeDB\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u3001kanban\u64cd\u4f5c\u6642\u306b\u30c7\u30fc\u30bf\u3092NeDB\u3078\u4fdd\u5b58\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<br>\u307e\u305a\u3001jKanban\u304b\u3089\u4fdd\u5b58\u7528\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u53d6\u5f97\u3059\u308b\u95a2\u6570\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n\/\/ kanban\u304b\u3089db\u767b\u9332\u7528\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u3059\u308b\nfunction getBoardItem(boardid) {\n    var target = kanban.getBoardElements(boardid);\/\/ kanban\u304b\u3089\u6307\u5b9a\u3057\u305f\u30dc\u30fc\u30c9ID\u306e\u30a8\u30ec\u30e1\u30f3\u30c8\u3092\u53d6\u5f97\n    var items = Array.from(target).map(x => ({ title: x.textContent }));\/\/ \u53d6\u5f97\u3057\u305f\u30a8\u30ec\u30e1\u30f3\u30c8\u3092\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\n    \/\/ DB\u767b\u9332\u7528\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\n    var board = {\n        boardid: boardid,\n        item: items\n    }\n    return board;\n}\n<\/pre><\/div>\n\n\n<p>  \u6b21\u306b\u3001\u53d6\u5f97\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092DB\u306b\u4fdd\u5b58\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u7528\u610f\u3057\u307e\u3059\u3002 <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nfunction saveBoard() {\n    for (var i = 1; i <= 4; i++) {\/\/\u30dc\u30fc\u30c9\u6570\u5206\u306e\u30eb\u30fc\u30d7\n        var boardid = `board-${i}`;\n        var query = { 'boardid': boardid };\n        var board = getBoardItem(boardid);\/\/ DB\u767b\u9332\u7528\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092kanban\u304b\u3089\u53d6\u5f97\n        var options = { upsert: true };\/\/ query\u306e\u5bfe\u8c61\u304c\u5b58\u5728\u3057\u306a\u3051\u308c\u3070\u66f4\u65b0\u3067\u306f\u306a\u304f\u8ffd\u52a0\n        db.update(query, board, options, function (err, numOfDocs) {\n            console.log(board, numOfDocs);\n        });\n    }\n}\n<\/pre><\/div>\n\n\n<p>\u5148\u307b\u3069\u7d39\u4ecb\u3057\u305f<strong>db.update<\/strong>\u3092\u4f7f\u3063\u3066kanban\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092DB\u306b\u767b\u9332\u3057\u307e\u3059\u3002<br><strong>option<\/strong>\u3067<strong>upsert<\/strong>\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u8ffd\u52a0\u30fb\u66f4\u65b0\u30921\u6587\u3067\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p> \u6b21\u306b\u3001kanban\u64cd\u4f5c\u6642\u306b\u30c7\u30fc\u30bf\u3092\u4fdd\u5b58\u3057\u305f\u3044\u306e\u3067\u3001kanban\u306e\u5404\u30a4\u30d9\u30f3\u30c8\u51e6\u7406\u3067\u4e0a\u8a18\u306esaveBoard\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002 <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n        var kanban = new jKanban({\n            element: \"#kanban\",     \/\/\u30dc\u30fc\u30c9\u8868\u793a\u5bfe\u8c61\u306e\u8981\u7d20\n            gutter: '5px',         \/\/\u30dc\u30fc\u30c9\u540c\u58eb\u306e\u9593\u9694\n            widthBoard: '250px',    \/\/\u30dc\u30fc\u30c9\u306e\u30b5\u30a4\u30ba\n            boards: boards,         \/\/\u521d\u671f\u30c7\u30fc\u30bf\n            dragBoards: false,       \/\/\u30dc\u30fc\u30c9\u306e\u30c9\u30e9\u30c3\u30b0\n            itemAddOptions: {       \/\/\u30bf\u30b9\u30af\u8ffd\u52a0\u7528\u306e\u30dc\u30bf\u30f3\u3092\u8868\u793a\n                enabled: true,                                      \/\/ \u8ffd\u52a0\u30dc\u30bf\u30f3\u8868\u793a\n                content: '+',                                       \/\/ \u30dc\u30bf\u30f3\u30c6\u30ad\u30b9\u30c8\n                class: 'kanban-title-button btn btn-light btn-sm',  \/\/ \u30dc\u30bf\u30f3\u306b\u8a2d\u5b9a\u3059\u308bclass\n                footer: false                                       \/\/ \u8868\u793a\u4f4d\u7f6e\n            },\n            click: function (el) {\n\n            },\n            buttonClick: function (el, boardId) {\n                \/\/ \u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3092\u4f5c\u6210\u3057\u3066\u30dc\u30fc\u30c9\u306b\u8ffd\u52a0\n                const formItem = document.createElement('form');\n                formItem.innerHTML = '<input type=\"text\" class=\"form-control\" placeholder=\"\u8ab2\u984c\u3092\u5165\u529b...\">'\n                formItem.innerHTML += '<button type=\"submit\" class=\"btn btn-primary btn-sm\">\u8ffd\u52a0<\/button>'\n                formItem.innerHTML += '<button type=\"button\" class=\"btn btn-secondary btn-sm\">\u30ad\u30e3\u30f3\u30bb\u30eb<\/button>';\n                kanban.addForm(boardId, formItem);\n\n                \/\/\u30ad\u30e3\u30f3\u30bb\u30eb\u30dc\u30bf\u30f3\n                formItem.elements&#x5B;2].addEventListener(\"click\", (e) => {\n                    formItem.parentNode.removeChild(formItem); \/\/\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u524a\u9664\n                });\n                \/\/\u30bf\u30b9\u30af\u8ffd\u52a0\u51e6\u7406\n                formItem.addEventListener('submit', (e) => {\n                    e.preventDefault();\n                    var title = e.target&#x5B;0].value;\n                    \/\/ 0\u6587\u5b57\u306e\u5834\u5408\u767b\u9332\u3057\u306a\u3044\n                    if (title.length == 0) {\n                        return;\n                    }\n                    var elem = kanban.addElement(boardId, { \"title\": title }); \/\/\u5165\u529b\u3055\u308c\u305f\u6587\u5b57\u5217\u3092\u30bf\u30b9\u30af\u3068\u3057\u3066\u767b\u9332\n                    formItem.parentNode.removeChild(formItem); \/\/\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u524a\u9664\n                    saveBoard();\n                })\n            },\n            dropEl: function (el, target, souce, sibling) {\n                saveBoard();\n            }\n        });\n<\/pre><\/div>\n\n\n<p> \u524d\u56de\u306f<strong>buttonClick<\/strong>\u30a4\u30d9\u30f3\u30c8\u306e\u307f\u4f7f\u7528\u3057\u307e\u3057\u305f\u304c\u3001\u30bf\u30b9\u30af\u3092\u5225\u306e\u30dc\u30fc\u30c9\u306b\u79fb\u52d5\u3055\u305b\u305f\u969b\u3082DB\u3092\u66f4\u65b0\u3057\u305f\u3044\u306e\u3067\u3001<strong>dropEl<\/strong>\u30a4\u30d9\u30f3\u30c8\u3092\u8ffd\u52a0\u3057\u3066\u3001\u305d\u3061\u3089\u3067\u3082<strong>saveBoard()<\/strong>\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002 <\/p>\n\n\n\n<p>\u3053\u3053\u307e\u3067\u306e\u51e6\u7406\u3067\u3001\u304b\u3093\u3070\u3093\u3078\u306e\u30bf\u30b9\u30af\u8ffd\u52a0\u3001\u30dc\u30fc\u30c9\u79fb\u52d5\u306e\u5185\u5bb9\u304cDB\u306b\u53cd\u6620\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<strong>kanban.nedb<\/strong>\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u3068\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u30c6\u30ad\u30b9\u30c8\u3068\u3057\u3066\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"962\" height=\"534\" src=\"https:\/\/itport.cloud\/wp-content\/uploads\/2021\/08\/Untitled.png\" alt=\"\" class=\"wp-image-17038\" srcset=\"https:\/\/itport.cloud\/wp-content\/uploads\/2021\/08\/Untitled.png 962w, https:\/\/itport.cloud\/wp-content\/uploads\/2021\/08\/Untitled-300x167.png 300w, https:\/\/itport.cloud\/wp-content\/uploads\/2021\/08\/Untitled-768x426.png 768w, https:\/\/itport.cloud\/wp-content\/uploads\/2021\/08\/Untitled-450x250.png 450w, https:\/\/itport.cloud\/wp-content\/uploads\/2021\/08\/Untitled-900x500.png 900w\" sizes=\"auto, (max-width: 962px) 100vw, 962px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"5\"> \u4fdd\u5b58\u30c7\u30fc\u30bf\u306e\u8868\u793a <\/h2>\n\n\n\n<p> \u3053\u3053\u307e\u3067\u3067\u4fdd\u5b58\u306f\u3067\u304d\u307e\u3057\u305f\u304c\u3001\u30c4\u30fc\u30eb\u3092\u8d77\u52d5\u3059\u308b\u305f\u3073\u306b\u304b\u3093\u3070\u3093\u304c\u521d\u671f\u72b6\u614b\u306b\u623b\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001\u753b\u9762\u8d77\u52d5\u6642\u306b\u4fdd\u5b58\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u753b\u9762\u3078\u53cd\u6620\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002 <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n        function loadDB() {\n            db.find({ boardid: \/^board\/ }, function (err, docs) {\n                docs.forEach((doc) => {\n                    doc.item.forEach((item) => {\n                        kanban.addElement(doc.boardid, item); \/\/\u5165\u529b\u3055\u308c\u305f\u6587\u5b57\u5217\u3092\u30bf\u30b9\u30af\u3068\u3057\u3066\u767b\u9332\n                    });\n                });\n            });\n        }\n<\/pre><\/div>\n\n\n<p>DB\u306b\u4fdd\u5b58\u3055\u308c\u305f\u30c7\u30fc\u30bf\u304b\u3089\u3001\u201dboardid\u201d\u304c\u201dboard\u201d\u3067\u59cb\u307e\u308b\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3001\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092\u304b\u3093\u3070\u3093\u3078\u8ffd\u52a0\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u7528\u610f\u3057\u307e\u3059\u3002<br>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3092jKanban\u306e\u521d\u671f\u5316\u5f8c\u306b\u547c\u3073\u51fa\u3059\u3053\u3068\u3067\u3001\u8d77\u52d5\u3059\u308b\u305f\u3073\u306b\u524d\u56de\u64cd\u4f5c\u3057\u3066\u3044\u305f\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u304c\u3001\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"7\">\u6b21\u56de\u4e88\u544a<\/h2>\n\n\n\n<p>\u4eca\u56de\u306f\u3001\u30bf\u30b9\u30af\u306e\u4fdd\u5b58\u3068\u4fdd\u5b58\u30c7\u30fc\u30bf\u306e\u8868\u793a\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002<br>\u304b\u3093\u3070\u3093\u30a2\u30d7\u30ea\u3068\u3057\u3066\u6700\u4f4e\u9650\u306e\u6a5f\u80fd\u306f\u3067\u304d\u307e\u3057\u305f\u304c\u3001\u4e0d\u8981\u306a\u30e1\u30cb\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u305f\u308a\u3001\u30a6\u30a3\u30f3\u30c9\u30a6\u30b5\u30a4\u30ba\u304c\u9069\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u6b21\u56de\u306f\u305d\u306e\u3042\u305f\u308a\u306e\u5bfe\u5fdc\u3092\u9032\u3081\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u76ee\u6b21 \u306f\u3058\u3081\u306bNeDBNeDB\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9DB\u3078\u306e\u4fdd\u5b58\u4fdd\u5b58\u30c7\u30fc\u30bf\u306e\u8868\u793a\u6b21\u56de\u4e88\u544a \u306f\u3058\u3081\u306b \u524d\u56de\u306f\u3001jKanban\u3092\u4f7f\u7528\u3057\u3066\u304b\u3093\u3070\u3093\u30a2\u30d7\u30ea\u306e\u753b\u9762\u3092\u4f5c\u6210\u3057\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u3001\u30bf\u30b9\u30af\u306e\u4fdd\u5b58\u3068\u4fdd\u5b58\u30c7\u30fc\u30bf\u306e\u8868\u793a\u3092\u884c\u3044\u307e\u3059\u3002 NeDB \u4eca\u56de\u306f\u30bf\u30b9\u30af\u3092\u4fdd\u5b58\u3057\u3066\u3001\u6b21\u56de\u8d77\u52d5\u6642\u306b\u4fdd\u5b58\u3057\u305f\u30bf\u30b9\u30af\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u306e\u3067\u3001NeDB\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002NeDB\u306fJavaScript\u3067\u52d5\u4f5c\u3059\u308b\u7d44\u307f\u8fbc\u307f\u7528\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u3001\u5225\u9014DB\u7528\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u4e0d\u8981\u3067JavaScript\u3092\u5b9f\u884c\u3067\u304d\u308b\u74b0\u5883\u3067\u3042\u308c\u3070\u52d5\u4f5c\u3057\u307e\u3059\u3002NeDB\uff1ahttps:\/\/github.com\/louischatriot\/nedb \u203bNeDB\u306f2015\u5e74\u304b\u3089\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u305b\u3093\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044&hellip;","protected":false},"author":24,"featured_media":13481,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69],"tags":[70],"class_list":{"0":"post-17036","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-electron","8":"tag-season23"},"_links":{"self":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/17036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17036"}],"version-history":[{"count":11,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/17036\/revisions"}],"predecessor-version":[{"id":17978,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/posts\/17036\/revisions\/17978"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=\/wp\/v2\/media\/13481"}],"wp:attachment":[{"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itport.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}