<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] ## 概述 一個帶有 SQL 語法的 IndexedDB 包裝器。 ## demo ``` // 創建數據庫 var dbName ='JsStore_Demo'; var tblProduct = { name: 'Product', columns: { // Here "Id" is name of column id:{ primaryKey: true, autoIncrement: true }, itemName: { notNull: true, dataType: "string" }, price: { notNull: true, dataType: "number" }, quantity : { notNull: true, dataType: "number" } } }; var database = { name: dbName, tables: [tblProduct] } // 初始化數據庫 const isDbCreated = await connection.initDb(database); if(isDbCreated === true){ console.log("db created"); // here you can prefill database with some data } else { console.log("db opened"); } // 生成數據 var value = { itemName: 'Blue Jeans', price: 2000, quantity: 1000 } var insertCount = await connection.insert({ into: 'Product', values: [value] }); console.log(`${insertCount} rows inserted`); // 讀數據 // results will be array of objects var results = await connection.select({ from: 'Product', where: { id: 5 } }); alert(results.length + 'record found'); // 更新數據 var rowsUpdated = await connection.update({ in: 'Product', where: { itemName: { like: '%black%' } }, set: { quantity: 2000 } }); alert(rowsUpdated + ' rows updated'); // 刪除數據 var rowsDeleted = await connection.remove({ from: 'Product', where: { id: 10 } }); alert(rowsDeleted + ' record deleted'); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看