@ocoda/event-sourcing-mariadb 3.0.1 → 3.0.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @ocoda/event-sourcing-mariadb
2
2
 
3
+ ## 3.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#544](https://github.com/ocoda/event-sourcing/pull/544) [`94b5f48`](https://github.com/ocoda/event-sourcing/commit/94b5f48415e54e3408f21c35858b431311c04462) Thanks [@drieshooghe](https://github.com/drieshooghe)! - `getLastSnapshots([])` and `getManyLastSnapshotEnvelopes([])` of the MariaDB snapshot store, and so `SnapshotRepository.loadMany([])`, return an empty map instead of failing with an SQL syntax error.
8
+
9
+ - Updated dependencies [[`94b5f48`](https://github.com/ocoda/event-sourcing/commit/94b5f48415e54e3408f21c35858b431311c04462)]:
10
+ - @ocoda/event-sourcing@3.0.2
11
+
3
12
  ## 3.0.1
4
13
 
5
14
  ### Patch Changes
package/dist/index.js CHANGED
@@ -851,6 +851,9 @@ var _MariaDBSnapshotStore = class _MariaDBSnapshotStore extends import_event_sou
851
851
  }
852
852
  getLastStreamEntities(collection, streams, fields, connection) {
853
853
  return __async(this, null, function* () {
854
+ if (streams.length === 0) {
855
+ return [];
856
+ }
854
857
  const latestIds = streams.map(({ streamId }) => `latest#${streamId}`);
855
858
  return (connection || this.pool).query(`SELECT ${fields.join(", ")}
856
859
  FROM ${this.pool.escapeId(collection)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocoda/event-sourcing-mariadb",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "NestJS Event Sourcing Library (@mariadb)",
5
5
  "author": "Dries Hooghe <dries@drieshooghe.com>",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "@nestjs/core": "^11.0.0",
20
20
  "reflect-metadata": "^0.2.0",
21
21
  "rxjs": "^7.2.0",
22
- "@ocoda/event-sourcing": "3.0.1"
22
+ "@ocoda/event-sourcing": "3.0.2"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@biomejs/biome": "1.9.4",