Store receivedAtCounter separately for unprocessed

This commit is contained in:
Fedor Indutny
2022-03-24 14:28:56 -07:00
committed by GitHub
parent 0f5a01f2b2
commit ca3f8b7df0
8 changed files with 50 additions and 4 deletions

View File

@@ -2969,6 +2969,7 @@ function saveUnprocessedSync(data: UnprocessedType): string {
const {
id,
timestamp,
receivedAtCounter,
version,
attempts,
envelope,
@@ -2994,6 +2995,7 @@ function saveUnprocessedSync(data: UnprocessedType): string {
INSERT OR REPLACE INTO unprocessed (
id,
timestamp,
receivedAtCounter,
version,
attempts,
envelope,
@@ -3006,6 +3008,7 @@ function saveUnprocessedSync(data: UnprocessedType): string {
) values (
$id,
$timestamp,
$receivedAtCounter,
$version,
$attempts,
$envelope,
@@ -3020,6 +3023,7 @@ function saveUnprocessedSync(data: UnprocessedType): string {
).run({
id,
timestamp,
receivedAtCounter: receivedAtCounter ?? null,
version,
attempts,
envelope: envelope || null,