You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
536 B
12 lines
536 B
/**
|
|
* Core persistence adapter interface
|
|
*/
|
|
export interface PersistenceAdapter {
|
|
insert<T>(entityType: string, data: T): Promise<T>;
|
|
update<T>(entityType: string, id: string, data: Partial<T>): Promise<T>;
|
|
delete(entityType: string, id: string): Promise<void>;
|
|
findById<T>(entityType: string, id: string): Promise<T>;
|
|
// Optional methods - implement as needed
|
|
deleteMany?(entityType: string, ids: string[]): Promise<void>;
|
|
findMany?<T>(entityType: string, query?: Record<string, unknown>): Promise<T[]>;
|
|
} |