mm_sqlite 1.2.6 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -281,7 +281,7 @@ SQLite.prototype.getConn = async function (timeout) {
|
|
|
281
281
|
* @returns {Promise<object>}
|
|
282
282
|
* @throws {TypeError} 当sql参数无效时
|
|
283
283
|
*/
|
|
284
|
-
SQLite.prototype.run = async function (sql, params, timeout) {
|
|
284
|
+
SQLite.prototype.run = async function (sql, params = [], timeout = 30000) {
|
|
285
285
|
// 参数校验
|
|
286
286
|
if (typeof sql !== 'string' || sql.trim() === '') {
|
|
287
287
|
throw new TypeError('sql must be non-empty string');
|