Class Partition<T, TCtor>
Type parameters
-
T: { id: string }
-
TCtor: ModelConstructor<T>
Properties
Readonly container
container: Container
Readonly ctor
ctor: TCtor
Accessors
query
- get query(): Query<T, TCtor>
-
Returns Query<T, TCtor>
Methods
delete
- delete(id: string, options?: RequestOptions): Promise<ItemResponse<T>>
-
Parameters
-
id: string
-
Optional options: RequestOptions
Returns Promise<ItemResponse<T>>
find
- find(id: string, options?: RequestOptions): Promise<InstanceType<TCtor>>
-
Parameters
-
id: string
-
Optional options: RequestOptions
Returns Promise<InstanceType<TCtor>>
findWithDetails
- findWithDetails(id: string, options?: RequestOptions): Promise<IResourceResponse<InstanceType<TCtor>>>
-
Parameters
-
id: string
-
Optional options: RequestOptions
Returns Promise<IResourceResponse<InstanceType<TCtor>>>
maybeFind
- maybeFind(id: string, options?: RequestOptions): Promise<undefined | InstanceType<TCtor>>
-
Parameters
-
id: string
-
Optional options: RequestOptions
Returns Promise<undefined | InstanceType<TCtor>>
Runs a query in the partition.