MCPcopy
hub / github.com/TryGhost/Ghost / PersistenceAdapter

Interface PersistenceAdapter

e2e/data-factory/persistence/adapter.ts:4–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2 * Core persistence adapter interface
3 */
4export interface PersistenceAdapter {
5 insert<T>(entityType: string, data: T): Promise<T>;
6 update<T>(entityType: string, id: string, data: Partial<T>): Promise<T>;
7 delete(entityType: string, id: string): Promise<void>;
8 findById<T>(entityType: string, id: string): Promise<T>;
9 // Optional methods - implement as needed
10 deleteMany?(entityType: string, ids: string[]): Promise<void>;
11 findMany?<T>(entityType: string, query?: Record<string, unknown>): Promise<T[]>;
12}

Callers 24

createFunction · 0.65
insertMethod · 0.65
#runMethod · 0.65
addPermissionHelperFunction · 0.65
addSettingFunction · 0.65
removeSettingFunction · 0.65
updateMemberFunction · 0.65
updateNewsletterFunction · 0.65
updateMemberDataFunction · 0.65

Implementers 2

KnexPersistenceAdaptere2e/data-factory/persistence/adapters/
ApiPersistenceAdaptere2e/data-factory/persistence/adapters/

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…