tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
289
fork
atom
a tool for shared writing and social publishing
289
fork
atom
overview
issues
27
pulls
pipelines
don't use subtransaction for fact insertions
awarm.space
6 months ago
1d761288
3e1fbd80
+6
-7
1 changed file
expand all
collapse all
unified
split
src
replicache
cachedServerMutationContext.ts
+6
-7
src/replicache/cachedServerMutationContext.ts
···
193
193
}
194
194
}
195
195
196
196
-
await tx.transaction((tx2) =>
197
197
-
tx2
196
196
+
try {
197
197
+
await tx
198
198
.insert(facts)
199
199
.values({
200
200
id: f.id,
···
205
205
.onConflictDoUpdate({
206
206
target: facts.id,
207
207
set: { data: driz.sql`excluded.data` },
208
208
-
})
209
209
-
.catch((e) =>
210
210
-
console.log(`error on inserting fact: `, JSON.stringify(e)),
211
211
-
),
212
212
-
);
208
208
+
});
209
209
+
} catch (e) {
210
210
+
console.log(`error on inserting fact: `, JSON.stringify(e));
211
211
+
}
213
212
}
214
213
}
215
214
if (deleteEntitiesCache.length > 0)