baja-lite 1.6.2 → 1.6.3
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/package.json +1 -1
- package/sql.js +0 -2
- package/sqlite.js +1 -3
package/package.json
CHANGED
package/sql.js
CHANGED
|
@@ -3127,7 +3127,6 @@ export class SqlService {
|
|
|
3127
3127
|
}
|
|
3128
3128
|
}
|
|
3129
3129
|
option.conn.execute(SyncMode.Sync, `INSERT INTO ${tableES} (${columns}) SELECT ${columns} FROM ${rtable};`);
|
|
3130
|
-
option.conn.execute(SyncMode.Sync, `INSERT INTO ${tableES} (${columns}) SELECT ${columns} FROM ${rtable};`);
|
|
3131
3130
|
option.conn.execute(SyncMode.Sync, `DROP TABLE IF EXISTS ${rtable};`);
|
|
3132
3131
|
// 更新完毕,保存版本号
|
|
3133
3132
|
option.conn.execute(SyncMode.Sync, 'UPDATE TABLE_VERSION SET ______version = ? WHERE ______tableName = ?', [option.tableName, lastVersion]);
|
|
@@ -3186,7 +3185,6 @@ export class SqlService {
|
|
|
3186
3185
|
}
|
|
3187
3186
|
}
|
|
3188
3187
|
await option.conn.execute(SyncMode.Async, `INSERT INTO ${tableES} (${columns}) SELECT ${columns} FROM ${rtable};`);
|
|
3189
|
-
await option.conn.execute(SyncMode.Async, `INSERT INTO ${tableES} (${columns}) SELECT ${columns} FROM ${rtable};`);
|
|
3190
3188
|
await option.conn.execute(SyncMode.Async, `DROP TABLE IF EXISTS ${rtable};`);
|
|
3191
3189
|
// 更新完毕,保存版本号
|
|
3192
3190
|
await option.conn.execute(SyncMode.Async, 'UPDATE TABLE_VERSION SET ______version = ? WHERE ______tableName = ?', [option.tableName, lastVersion]);
|
package/sqlite.js
CHANGED
|
@@ -151,9 +151,7 @@ export class SqliteRemoteClass {
|
|
|
151
151
|
.replace('%s', date.getSeconds().toString().padStart(2, '0'));
|
|
152
152
|
});
|
|
153
153
|
this.dbList[dbName].function('RAND', { deterministic: false }, () => Math.random());
|
|
154
|
-
this.dbList[dbName].function('UNIX_TIMESTAMP', { deterministic: false }, (dateStr) => dateStr
|
|
155
|
-
? Math.floor(new Date(dateStr).getTime() / 1000)
|
|
156
|
-
: Math.floor(Date.now() / 1000));
|
|
154
|
+
this.dbList[dbName].function('UNIX_TIMESTAMP', { deterministic: false }, (dateStr) => dateStr ? Math.floor(new Date(dateStr).getTime() / 1000) : Math.floor(Date.now() / 1000));
|
|
157
155
|
}
|
|
158
156
|
}
|
|
159
157
|
async export(dbName, exportPath) {
|