mm_sqlite 1.3.8 → 1.3.9
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/db.js +2 -2
- package/package.json +1 -1
- package/test_db/performance_test.db +0 -0
- package/test_db/test_basic.db +0 -0
- package/test_db/test_core_methods.db +0 -0
- package/test_db/test_db.db +0 -0
- package/test_db/test_delete_verification.db +0 -0
- package/test_db/test_original_timeout.db +0 -0
- package/test_db/test_simple.db +0 -0
- package/test_db/test_sql.db +0 -0
- package/test_db/test_timeout_fix.db +0 -0
- package/test_db/test_transaction.db +0 -0
package/db.js
CHANGED
|
@@ -57,12 +57,12 @@ DB.prototype.database = function () {
|
|
|
57
57
|
* @param {string} key 键名
|
|
58
58
|
* @returns {object} 返回管理器
|
|
59
59
|
*/
|
|
60
|
-
DB.prototype.new = function (table, key) {
|
|
60
|
+
DB.prototype.new = function (table = '', key = '') {
|
|
61
61
|
var db = this.getParent().db();
|
|
62
62
|
db.table = table;
|
|
63
63
|
if (key) {
|
|
64
64
|
db.key = key;
|
|
65
|
-
} else {
|
|
65
|
+
} else if (table) {
|
|
66
66
|
var arr = table.split('_');
|
|
67
67
|
db.key = arr[arr.length - 1] + '_id';
|
|
68
68
|
}
|
package/package.json
CHANGED
|
Binary file
|
package/test_db/test_basic.db
DELETED
|
Binary file
|
|
Binary file
|
package/test_db/test_db.db
DELETED
|
Binary file
|
|
Binary file
|
|
File without changes
|
package/test_db/test_simple.db
DELETED
|
Binary file
|
package/test_db/test_sql.db
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|