Graphorin API reference v0.4.0
Graphorin API reference / @graphorin/store-sqlite / / SqliteConflictStore
Class: SqliteConflictStore
Defined in: packages/store-sqlite/src/conflict-store.ts:133
SQLite-backed conflict store. Constructed by SqliteMemoryStore; never instantiated directly by application code.
Stable
Constructors
Constructor
new SqliteConflictStore(conn): SqliteConflictStore;Defined in: packages/store-sqlite/src/conflict-store.ts:136
Parameters
| Parameter | Type |
|---|---|
conn | SqliteConnection |
Returns
SqliteConflictStore
Methods
enqueuePending()
enqueuePending(input): Promise<{
id: number;
}>;Defined in: packages/store-sqlite/src/conflict-store.ts:167
Enqueue a candidate fact + the conflicting fact ids for the deep phase.
Parameters
| Parameter | Type |
|---|---|
input | PendingConflictInput |
Returns
Promise<{ id: number; }>
listPending()
listPending(scope, limit?): Promise<readonly PendingConflictRow[]>;Defined in: packages/store-sqlite/src/conflict-store.ts:192
List pending rows for the supplied user, oldest-first.
Parameters
| Parameter | Type | Default value |
|---|---|---|
scope | SessionScope | undefined |
limit | number | 50 |
Returns
Promise<readonly PendingConflictRow[]>
listRecentDecisions()
listRecentDecisions(scope, limit?): Promise<readonly {
candidateId: string;
decision: string;
detectedAt: number;
detectedBy: string;
detectionZone: string | null;
existingId: string | null;
id: number;
reason: string | null;
similarity: number | null;
stage: string;
}[]>;Defined in: packages/store-sqlite/src/conflict-store.ts:246
Read-back helper used by the audit-replay surface (Phase 14c) and the test suite — returns up to limit recent rows for the scope.
Parameters
| Parameter | Type | Default value |
|---|---|---|
scope | SessionScope | undefined |
limit | number | 50 |
Returns
Promise<readonly { candidateId: string; decision: string; detectedAt: number; detectedBy: string; detectionZone: string | null; existingId: string | null; id: number; reason: string | null; similarity: number | null; stage: string; }[]>
Stable
markResolved()
markResolved(id, decision): Promise<void>;Defined in: packages/store-sqlite/src/conflict-store.ts:231
Mark a pending row resolved (used by the deep phase in Phase 10c).
Parameters
| Parameter | Type |
|---|---|
id | number |
decision | ConflictPipelineDecision |
Returns
Promise<void>
recordDecision()
recordDecision(input): Promise<ConflictAuditRow>;Defined in: packages/store-sqlite/src/conflict-store.ts:141
Record a single decision row. Returns the autogenerated id.
Parameters
| Parameter | Type |
|---|---|
input | ConflictAuditInput |
Returns
Promise<ConflictAuditRow>