Skip to content

AIDK API Reference / aidk-server / InMemoryExecutionRepository

Class: InMemoryExecutionRepository ​

Defined in: packages/server/src/persistence/in-memory.ts:71

Implements ​

Constructors ​

Constructor ​

ts
new InMemoryExecutionRepository(store: InMemoryStore): InMemoryExecutionRepository;

Defined in: packages/server/src/persistence/in-memory.ts:72

Parameters ​

ParameterType
storeInMemoryStore

Returns ​

InMemoryExecutionRepository

Methods ​

create() ​

ts
create(data: Omit<ExecutionEntity, "started_at"> & {
  started_at?: Date;
}): Promise<ExecutionEntity>;

Defined in: packages/server/src/persistence/in-memory.ts:74

Parameters ​

ParameterType
dataOmit<ExecutionEntity, "started_at"> & { started_at?: Date; }

Returns ​

Promise<ExecutionEntity>

Implementation of ​

ExecutionRepository.create


findAll() ​

ts
findAll(params?: {
  limit?: number;
  offset?: number;
  tenant_id?: string;
  thread_id?: string;
  user_id?: string;
}): Promise<ExecutionEntity[]>;

Defined in: packages/server/src/persistence/in-memory.ts:118

Parameters ​

ParameterType
params?{ limit?: number; offset?: number; tenant_id?: string; thread_id?: string; user_id?: string; }
params.limit?number
params.offset?number
params.tenant_id?string
params.thread_id?string
params.user_id?string

Returns ​

Promise<ExecutionEntity[]>

Implementation of ​

ExecutionRepository.findAll


findById() ​

ts
findById(id: string): Promise<ExecutionEntity | null>;

Defined in: packages/server/src/persistence/in-memory.ts:94

Parameters ​

ParameterType
idstring

Returns ​

Promise<ExecutionEntity | null>

Implementation of ​

ExecutionRepository.findById


findByRootId() ​

ts
findByRootId(rootId: string): Promise<ExecutionEntity[]>;

Defined in: packages/server/src/persistence/in-memory.ts:112

Parameters ​

ParameterType
rootIdstring

Returns ​

Promise<ExecutionEntity[]>

Implementation of ​

ExecutionRepository.findByRootId


findByThreadId() ​

ts
findByThreadId(threadId: string, limit: number): Promise<ExecutionEntity[]>;

Defined in: packages/server/src/persistence/in-memory.ts:98

Parameters ​

ParameterTypeDefault value
threadIdstringundefined
limitnumber100

Returns ​

Promise<ExecutionEntity[]>

Implementation of ​

ExecutionRepository.findByThreadId


findByUserId() ​

ts
findByUserId(userId: string, limit: number): Promise<ExecutionEntity[]>;

Defined in: packages/server/src/persistence/in-memory.ts:105

Parameters ​

ParameterTypeDefault value
userIdstringundefined
limitnumber100

Returns ​

Promise<ExecutionEntity[]>

Implementation of ​

ExecutionRepository.findByUserId


update() ​

ts
update(id: string, updates: Partial<ExecutionEntity>): Promise<ExecutionEntity | null>;

Defined in: packages/server/src/persistence/in-memory.ts:86

Parameters ​

ParameterType
idstring
updatesPartial<ExecutionEntity>

Returns ​

Promise<ExecutionEntity | null>

Implementation of ​

ExecutionRepository.update

Released under the MIT License.