@superhero/eventflow-db 4.3.109 → 4.4.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/eventflow-db",
3
- "version": "4.3.109",
3
+ "version": "4.4.1",
4
4
  "description": "Eventflow db is a set of common database logic in the eventflow ecosystem.",
5
5
  "keywords": [
6
6
  "eventflow"
@@ -1,7 +1,10 @@
1
1
  UPDATE certificate AS c
2
2
  LEFT JOIN
3
3
  (
4
- SELECT id, COUNT(*) AS new_version
4
+ SELECT
5
+ id,
6
+ COUNT(*) AS new_version
7
+
5
8
  FROM certificate
6
9
  GROUP BY id
7
10
  ) sub
@@ -1,4 +1,5 @@
1
1
  DELETE
2
2
  FROM event_cpid
3
3
  WHERE event_id = CAST(? AS CHAR CHARACTER SET ascii) COLLATE ascii_bin
4
+ AND domain = CAST(? AS CHAR CHARACTER SET ascii) COLLATE ascii_bin
4
5
  AND cpid = CAST(? AS CHAR CHARACTER SET ascii) COLLATE ascii_bin
@@ -1,4 +1,5 @@
1
1
  INSERT INTO event_cpid
2
2
  SET
3
- event_id = ?,
4
- cpid = ?
3
+ event_id = ?,
4
+ domain = ?,
5
+ cpid = ?
@@ -1,7 +1,10 @@
1
1
  SELECT event.*
2
2
  FROM event_cpid
3
+
3
4
  JOIN event
4
- ON event_id = event.id AND event.domain = event_cpid.domain
5
+ ON event_id = event.id
6
+
5
7
  WHERE event_cpid.cpid = CAST(? AS CHAR CHARACTER SET ascii) COLLATE ascii_bin
6
8
  AND event_cpid.domain = CAST(? AS CHAR CHARACTER SET ascii) COLLATE ascii_bin
9
+
7
10
  ORDER BY timestamp ASC