MCPcopy Create free account
hub / github.com/Effect-TS/effect / entry

Function entry

packages/sql/sqlite-node/test/SqlEventJournal.test.ts:27–36  ·  view source on GitHub ↗
(msecs: number, event = "Repro", primaryKey = "key", tail?: number)

Source from the content-addressed store, hash-verified

25// `tail` fixes the random id bytes, so entries sharing a millisecond sort in a
26// known order by id.
27const entry = (msecs: number, event = "Repro", primaryKey = "key", tail?: number) => {
28 const id = EventJournal.makeEntryIdUnsafe({ msecs })
29 if (tail !== undefined) id.fill(tail, 6)
30 return new EventJournal.Entry({
31 id,
32 event,
33 primaryKey,
34 payload: new Uint8Array()
35 }, { disableChecks: true })
36}
37
38const localEntry = (primaryKey: string) => ({ event: "Repro", primaryKey, payload: new Uint8Array() })
39

Callers 1

Calls 1

fillMethod · 0.80

Tested by

no test coverage detected