The entity type that defines the structure of data stored in the repository. Defaults to Record<string, any>
The Storehouse registry containing registered managers and models
When used with 2 arguments, this is the name of the model to retrieve
The requested Redis-OM Repository
Retrieves a Redis-OM Repository (model) from a specific manager in the registry.
The entity type that defines the structure of data stored in the repository. Defaults to Record<string, any>
The Storehouse registry containing registered managers and models
The name of the manager containing the model
The name of the specific model to retrieve
The requested Redis-OM Repository typed with the entity structure
// Get model from specific manager with typed entity
interface Product {
title: string;
price: number;
inStock: boolean;
}
const productRepository = getModel<Product>(registry, 'redis-manager', 'Product');
const products = await productRepository.search().return.all();
// products will be typed as Array<Product & Entity>
Retrieves a Redis-OM Repository (model) from the registry.
This function has two overload signatures: