baja-lite 1.6.1 → 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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/sql.js +0 -3
  3. package/sqlite.js +1 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baja-lite",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "description": "some util for self",
5
5
  "homepage": "https://github.com/void-soul/baja-lite",
6
6
  "repository": {
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]);
@@ -3852,7 +3850,6 @@ class StreamQuery {
3852
3850
  for (const [key, value] of Object.entries(t)) {
3853
3851
  this._updates[this[_fields][String(key)]?.C2()] = value;
3854
3852
  }
3855
- Object.assign(this._updates, t);
3856
3853
  return this;
3857
3854
  }
3858
3855
  /** SET key = REPLACE(key, :valueToFind, :valueToReplace) */
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) {