ravendb
Version:
RavenDB client for Node.js
52 lines • 2.58 kB
TypeScript
import { ILazyLoaderWithInclude } from "../../Loaders/ILazyLoaderWithInclude.js";
import { ObjectTypeDescriptor, EntitiesCollectionObject } from "../../../../Types/index.js";
import { Lazy } from "../../../Lazy.js";
import { SessionLoadStartingWithOptions } from "../../IDocumentSession.js";
import { ConditionalLoadResult } from "../../ConditionalLoadResult.js";
/**
* Specify interface for lazy operation for the session
*/
export interface ILazySessionOperations {
/**
* Begin a load while including the specified path
*/
include(path: string): ILazyLoaderWithInclude;
/**
* Loads the specified entities with the specified ids.
*/
load<TEntity extends object>(ids: string[], clazz: ObjectTypeDescriptor<TEntity>): Lazy<EntitiesCollectionObject<TEntity>>;
/**
* Loads the specified entities with the specified ids.
*/
load<TEntity extends object>(ids: string[]): Lazy<EntitiesCollectionObject<TEntity>>;
/**
* Loads the specified entity with the specified id.
*/
load<TEntity extends object>(id: string): Lazy<TEntity | null>;
/**
* Loads the specified entity with the specified id.
*/
load<TEntity extends object>(id: string, clazz: ObjectTypeDescriptor<TEntity>): Lazy<TEntity | null>;
/**
* Loads multiple entities that contain common prefix.
*/
loadStartingWith<TEntity extends object>(idPrefix: string): Lazy<EntitiesCollectionObject<TEntity>>;
/**
* Loads multiple entities that contain common prefix.
*/
loadStartingWith<TEntity extends object>(idPrefix: string, clazz: ObjectTypeDescriptor<TEntity>): Lazy<EntitiesCollectionObject<TEntity>>;
/**
* Loads multiple entities that contain common prefix.
*/
loadStartingWith<TEntity extends object>(idPrefix: string, opts: SessionLoadStartingWithOptions<TEntity>): Lazy<EntitiesCollectionObject<TEntity>>;
/**
* Loads the specified entity with the specified id and changeVector.
* If the entity is loaded into the session, the tracked entity will be returned otherwise
* the entity will be loaded only if it is fresher then the provided changeVector.
* @param id Identifier of a entity that will be conditional loaded.
* @param changeVector Change vector of a entity that will be conditional loaded.
* @param clazz Result class
*/
conditionalLoad<TEntity extends object>(id: string, changeVector: string, clazz: ObjectTypeDescriptor<TEntity>): Lazy<ConditionalLoadResult<TEntity>>;
}
//# sourceMappingURL=ILazySessionOperations.d.ts.map