MemoryRepository
Defined in: memory-repository.ts:43
Type Parameters
Section titled “Type Parameters”T extends Record<string, unknown>
Implements
Section titled “Implements”Repository<T,Partial<T>>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new MemoryRepository<
T>(options?):MemoryRepository<T>
Defined in: memory-repository.ts:52
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”MemoryRepository<T>
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get store():
ReadonlyMap<Id,Record<string,unknown>>
Defined in: memory-repository.ts:94
The raw internal store, keyed by id, holding records in storage-key shape (post-fieldMap).
Returns
Section titled “Returns”ReadonlyMap<Id, Record<string, unknown>>
Methods
Section titled “Methods”clear()
Section titled “clear()”clear():
this
Defined in: memory-repository.ts:106
Returns
Section titled “Returns”this
count()
Section titled “count()”count(
params?):Promise<number>
Defined in: memory-repository.ts:210
Parameters
Section titled “Parameters”params?
Section titled “params?”Returns
Section titled “Returns”Promise<number>
Implementation of
Section titled “Implementation of”deleteById()
Section titled “deleteById()”deleteById(
id):Promise<T>
Defined in: memory-repository.ts:201
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<T>
Implementation of
Section titled “Implementation of”describe()
Section titled “describe()”describe():
RepositoryCapabilities
Defined in: memory-repository.ts:223
Optional capability introspection. All
Returns
Section titled “Returns”Mantlejs
Section titled “Mantlejs”adapters implement it; user repositories may omit it.
Implementation of
Section titled “Implementation of”findAll()
Section titled “findAll()”findAll(
params?):Promise<T[]>
Defined in: memory-repository.ts:111
Parameters
Section titled “Parameters”params?
Section titled “params?”Returns
Section titled “Returns”Promise<T[]>
Implementation of
Section titled “Implementation of”findById()
Section titled “findById()”findById(
id):Promise<T|null>
Defined in: memory-repository.ts:139
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<T | null>
Implementation of
Section titled “Implementation of”patchById()
Section titled “patchById()”patchById(
id,data):Promise<T>
Defined in: memory-repository.ts:182
Parameters
Section titled “Parameters”Partial<T>
Returns
Section titled “Returns”Promise<T>
Implementation of
Section titled “Implementation of”save()
Section titled “save()”save(
data):Promise<T>
Defined in: memory-repository.ts:144
Parameters
Section titled “Parameters”Partial<T>
Returns
Section titled “Returns”Promise<T>
Implementation of
Section titled “Implementation of”saveAll()
Section titled “saveAll()”saveAll(
data):Promise<T[]>
Defined in: memory-repository.ts:162
Parameters
Section titled “Parameters”Partial<T>[]
Returns
Section titled “Returns”Promise<T[]>
Implementation of
Section titled “Implementation of”seed()
Section titled “seed()”seed(
records):this
Defined in: memory-repository.ts:98
Parameters
Section titled “Parameters”records
Section titled “records”T[]
Returns
Section titled “Returns”this
updateById()
Section titled “updateById()”updateById(
id,data):Promise<T>
Defined in: memory-repository.ts:166
Parameters
Section titled “Parameters”Partial<T>
Returns
Section titled “Returns”Promise<T>