<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          NeDBNode 嵌入式數(shù)據(jù)存儲

          聯(lián)合創(chuàng)作 · 2023-09-23 17:46

          Node.js 實現(xiàn)的嵌入式數(shù)據(jù)存儲,可以部分或全部替代sqlite數(shù)據(jù)庫??梢援?dāng)內(nèi)存數(shù)據(jù)庫使用也可本地存儲。

          NEDB采用非常靈活的查詢方式,讓你幾乎可以忘記他是非關(guān)系數(shù)據(jù)庫:

            (1) 可以使用正則查詢

            (2) and or where  大于 小于 排序等 

            (3) 索引

          數(shù)據(jù)存儲采用JSON新式,可以深度查詢。

          eg:

          // Let's say our datastore contains the following collection

           

          { _id: 'id5', completeData: { planets: [ { name: 'Earth', number: 3 }, { name: 'Mars', number: 2 }, { name: 'Pluton', number: 9 } ] } }
          db.find({ "completeData.planets.0.name": "Earth" }, function (err, docs) { // docs contains document 5 // If we had tested against "Mars" docs would be empty because we are matching against a specific array element });

          語法和MongoDB非常相似.

          Speed

          • Insert: 5,950 ops/s

          • Find: 25,440 ops/s

          • Update: 4,490 ops/s

          • Remove: 6,620 ops/s

          Memory footprint

          A copy of the whole database is kept in memory. This is not much on the expected kind of datasets (20MB for 10,000 2KB documents). If requested, I'll introduce an option to not use this cache to decrease memory footprint (at the cost of a lower speed).

          缺點:數(shù)據(jù)加載在內(nèi)存中進行操作,不適合內(nèi)存非常緊張的應(yīng)用。目前作者沒有給出細膩度的內(nèi)存控制方法。

          瀏覽 25
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  欧美成人网址在线观看 | 国产麻豆黄色有码 | 国产一级片免费视频 | 四虎大香蕉| 亚洲成人网站免费在线观看 |