↳ BaseFirestoreRepository‹Band›
↳ BandRepository
+ new BandRepository(pathOrConstructor : string |
IEntityConstructor): BandRepository |
Inherited from BaseFirestoreRepository.constructor
Defined in src/AbstractFirestoreRepository.ts:38
Parameters:
Name | Type |
---|---|
pathOrConstructor |
string | IEntityConstructor |
Returns: BandRepository
Protected
Readonly
colMetadata• colMetadata: FullCollectionMetadata
Inherited from TransactionRepository.colMetadata
Defined in src/AbstractFirestoreRepository.ts:35
Protected
Readonly
config• config: MetadataStorageConfig
Inherited from TransactionRepository.config
Defined in src/AbstractFirestoreRepository.ts:37
Protected
Readonly
firestoreColRef• firestoreColRef: CollectionReference
Inherited from TransactionRepository.firestoreColRef
Defined in src/AbstractFirestoreRepository.ts:38
Protected
Readonly
path• path: string
Inherited from TransactionRepository.path
Defined in src/AbstractFirestoreRepository.ts:36
â–¸ create(item
: PartialBy‹Band, “id”›): Promise‹Band›
Inherited from BaseFirestoreRepository.create
Overrides AbstractFirestoreRepository.create
Defined in src/BaseFirestoreRepository.ts:27
Parameters:
Name | Type |
---|---|
item |
PartialBy‹Band, “id”› |
Returns: Promise‹Band›
▸ createBatch(): FirestoreBatchSingleRepository‹IEntity›
Inherited from BaseFirestoreRepository.createBatch
Defined in src/BaseFirestoreRepository.ts:85
Returns: FirestoreBatchSingleRepository‹IEntity›
â–¸ delete(id
: string): Promise‹void›
Inherited from BaseFirestoreRepository.delete
Overrides AbstractFirestoreRepository.delete
Defined in src/BaseFirestoreRepository.ts:70
Parameters:
Name | Type |
---|---|
id |
string |
Returns: Promise‹void›
â–¸ execute(queries
: Array‹IFireOrmQueryLine›, limitVal?
: number, orderByObj?
: IOrderByParams, single?
: boolean): Promise‹Band[]›
Inherited from BaseFirestoreRepository.execute
Overrides AbstractFirestoreRepository.execute
Defined in src/BaseFirestoreRepository.ts:90
Parameters:
Name | Type |
---|---|
queries |
Array‹IFireOrmQueryLine› |
limitVal? |
number |
orderByObj? |
IOrderByParams |
single? |
boolean |
Returns: Promise‹Band[]›
Protected
extractTFromColSnapâ–¸ extractTFromColSnap(q
: QuerySnapshot, tran?
: Transaction, tranRefStorage?
: ITransactionReferenceStorage): Band[]
Inherited from TransactionRepository.extractTFromColSnap
Defined in src/AbstractFirestoreRepository.ts:129
Parameters:
Name | Type |
---|---|
q |
QuerySnapshot |
tran? |
Transaction |
tranRefStorage? |
ITransactionReferenceStorage |
Returns: Band[]
Protected
extractTFromDocSnapâ–¸ extractTFromDocSnap(doc
: DocumentSnapshot, tran?
: Transaction, tranRefStorage?
: ITransactionReferenceStorage): Band
Inherited from TransactionRepository.extractTFromDocSnap
Defined in src/AbstractFirestoreRepository.ts:114
Parameters:
Name | Type |
---|---|
doc |
DocumentSnapshot |
tran? |
Transaction |
tranRefStorage? |
ITransactionReferenceStorage |
Returns: Band
▸ find(): Promise‹Band[]›
Inherited from TransactionRepository.find
Defined in src/AbstractFirestoreRepository.ts:310
Execute the query and applies all the filters (if specified)
memberof
AbstractFirestoreRepository
Returns: Promise‹Band[]›
List of documents that matched the filters (if specified)
â–¸ findById(id
: string): Promise‹T›
Inherited from BaseFirestoreRepository.findById
Overrides AbstractFirestoreRepository.findById
Defined in src/BaseFirestoreRepository.ts:20
Parameters:
Name | Type |
---|---|
id |
string |
Returns: Promise‹T›
▸ findOne(): *Promise‹Band | null›* |
Inherited from TransactionRepository.findOne
Defined in src/AbstractFirestoreRepository.ts:323
Execute the query to find at least one document matching all filters (if specified)
memberof
AbstractFirestoreRepository
Returns: *Promise‹Band | null›* |
One document that matched the filters (if specified), or null if none exists.
Protected
initializeSubCollectionsâ–¸ initializeSubCollections(entity
: Band, tran?
: Transaction, tranRefStorage?
: ITransactionReferenceStorage): void
Inherited from TransactionRepository.initializeSubCollections
Defined in src/AbstractFirestoreRepository.ts:83
Parameters:
Name | Type |
---|---|
entity |
Band |
tran? |
Transaction |
tranRefStorage? |
ITransactionReferenceStorage |
Returns: void
â–¸ limit(limitVal
: number): IQueryBuilder‹Band›
Inherited from BaseFirestoreRepository.limit
Defined in src/AbstractFirestoreRepository.ts:267
Returns a new QueryBuilder with a maximum number of results to return. Can only be used once per query.
memberof
AbstractFirestoreRepository
Parameters:
Name | Type | Description |
---|---|---|
limitVal |
number | maximum number of results to return Must be greater or equal than 0 |
Returns: IQueryBuilder‹Band›
QueryBuilder A new QueryBuilder with the specified limit applied
â–¸ orderByAscending(prop
: IWherePropParam‹Band›): IQueryBuilder‹Band›
Inherited from BaseFirestoreRepository.orderByAscending
Defined in src/AbstractFirestoreRepository.ts:285
Returns a new QueryBuilder with an additional ascending order specified by @param prop. Can only be used once per query.
memberof
AbstractFirestoreRepository
Parameters:
Name | Type | Description |
---|---|---|
prop |
IWherePropParam‹Band› | field to be ordered on, where prop could be keyof T or a lambda where T is the first parameter |
Returns: IQueryBuilder‹Band›
A new QueryBuilder with the specified ordering applied.
â–¸ orderByDescending(prop
: IWherePropParam‹Band›): IQueryBuilder‹Band›
Inherited from BaseFirestoreRepository.orderByDescending
Defined in src/AbstractFirestoreRepository.ts:299
Returns a new QueryBuilder with an additional descending order specified by @param prop. Can only be used once per query.
memberof
AbstractFirestoreRepository
Parameters:
Name | Type | Description |
---|---|---|
prop |
IWherePropParam‹Band› | field to be ordered on, where prop could be keyof T or a lambda where T is the first parameter |
Returns: IQueryBuilder‹Band›
A new QueryBuilder with the specified ordering applied.
▸ runTransaction‹R›(executor
: function): Promise‹R›
Inherited from BaseFirestoreRepository.runTransaction
Defined in src/BaseFirestoreRepository.ts:75
Type parameters:
â–Ş R
Parameters:
â–Ş executor: function
â–¸ (tran
: ITransactionRepository‹Band›): Promise‹R›
Parameters:
Name | Type |
---|---|
tran |
ITransactionRepository‹Band› |
Returns: Promise‹R›
Protected
toSerializableObjectâ–¸ toSerializableObject(obj
: Band): Record‹string, unknown›
Inherited from TransactionRepository.toSerializableObject
Defined in src/AbstractFirestoreRepository.ts:61
Parameters:
Name | Type |
---|---|
obj |
Band |
Returns: Record‹string, unknown›
Protected
transformFirestoreTypesâ–¸ transformFirestoreTypes(obj
: Record‹string, unknown›): object
Inherited from TransactionRepository.transformFirestoreTypes
Defined in src/AbstractFirestoreRepository.ts:64
Parameters:
Name | Type |
---|---|
obj |
Record‹string, unknown› |
Returns: object
â–¸ update(item
: Band): Promise‹T›
Inherited from BaseFirestoreRepository.update
Overrides AbstractFirestoreRepository.update
Defined in src/BaseFirestoreRepository.ts:56
Parameters:
Name | Type |
---|---|
item |
Band |
Returns: Promise‹T›
â–¸ validate(item
: Band): Promise‹ValidationError[]›
Inherited from TransactionRepository.validate
Defined in src/AbstractFirestoreRepository.ts:333
Uses class-validator to validate an entity using decorators set in the collection class
Parameters:
Name | Type | Description |
---|---|---|
item |
Band | class or object representing an entity |
Returns: Promise‹ValidationError[]›
An array of class-validator errors
â–¸ whereArrayContains(prop
: IWherePropParam‹Band›, val
: IFirestoreVal): IQueryBuilder‹Band›
Inherited from TransactionRepository.whereArrayContains
Defined in src/AbstractFirestoreRepository.ts:223
Returns a new QueryBuilder with a filter specifying that the value in @param val must be contained in @param prop.
memberof
AbstractFirestoreRepository
Parameters:
Name | Type | Description |
---|---|---|
prop |
IWherePropParam‹Band› | field to be filtered on, where prop could be keyof T or a lambda where T is the first parameter |
val |
IFirestoreVal | value to compare in the filter |
Returns: IQueryBuilder‹Band›
A new QueryBuilder with the specified query applied.
â–¸ whereArrayContainsAny(prop
: IWherePropParam‹Band›, val
: IFirestoreVal[]): IQueryBuilder‹Band›
Inherited from TransactionRepository.whereArrayContainsAny
Defined in src/AbstractFirestoreRepository.ts:238
Returns a new QueryBuilder with a filter specifying that the field @param prop is an array that contains one or more of the comparison values in @param val
memberof
AbstractFirestoreRepository
Parameters:
Name | Type | Description |
---|---|---|
prop |
IWherePropParam‹Band› | field to be filtered on, where prop could be keyof T or a lambda where T is the first parameter |
val |
IFirestoreVal[] | array of values to compare in the filter (max 10 items in array) |
Returns: IQueryBuilder‹Band›
A new QueryBuilder with the specified query applied.
â–¸ whereEqualTo(prop
: IWherePropParam‹Band›, val
: IFirestoreVal): IQueryBuilder‹Band›
Inherited from TransactionRepository.whereEqualTo
Defined in src/AbstractFirestoreRepository.ts:148
Returns a new QueryBuilder with a filter specifying that the value in @param prop must be equal to @param val.
memberof
AbstractFirestoreRepository
Parameters:
Name | Type | Description |
---|---|---|
prop |
IWherePropParam‹Band› | field to be filtered on, where prop could be keyof T or a lambda where T is the first parameter |
val |
IFirestoreVal | value to compare in the filter |
Returns: IQueryBuilder‹Band›
A new QueryBuilder with the specified query applied.
â–¸ whereGreaterOrEqualThan(prop
: IWherePropParam‹Band›, val
: IFirestoreVal): IQueryBuilder‹Band›
Inherited from TransactionRepository.whereGreaterOrEqualThan
Defined in src/AbstractFirestoreRepository.ts:178
Returns a new QueryBuilder with a filter specifying that the value in @param prop must be greater or equal than @param val.
memberof
AbstractFirestoreRepository
Parameters:
Name | Type | Description |
---|---|---|
prop |
IWherePropParam‹Band› | field to be filtered on, where prop could be keyof T or a lambda where T is the first parameter |
val |
IFirestoreVal | value to compare in the filter |
Returns: IQueryBuilder‹Band›
A new QueryBuilder with the specified query applied.
â–¸ whereGreaterThan(prop
: IWherePropParam‹Band›, val
: IFirestoreVal): IQueryBuilder‹Band›
Inherited from TransactionRepository.whereGreaterThan
Defined in src/AbstractFirestoreRepository.ts:163
Returns a new QueryBuilder with a filter specifying that the value in @param prop must be greater than @param val.
memberof
AbstractFirestoreRepository
Parameters:
Name | Type | Description |
---|---|---|
prop |
IWherePropParam‹Band› | field to be filtered on, where prop could be keyof T or a lambda where T is the first parameter |
val |
IFirestoreVal | value to compare in the filter |
Returns: IQueryBuilder‹Band›
A new QueryBuilder with the specified query applied.
â–¸ whereIn(prop
: IWherePropParam‹Band›, val
: IFirestoreVal[]): IQueryBuilder‹Band›
Inherited from TransactionRepository.whereIn
Defined in src/AbstractFirestoreRepository.ts:253
Returns a new QueryBuilder with a filter specifying that the field @param prop matches any of the comparison values in @param val
memberof
AbstractFirestoreRepository
Parameters:
Name | Type | Description |
---|---|---|
prop |
IWherePropParam‹Band› | field to be filtered on, where prop could be keyof T or a lambda where T is the first parameter |
val |
IFirestoreVal[] | - |
Returns: IQueryBuilder‹Band›
A new QueryBuilder with the specified query applied.
â–¸ whereLessOrEqualThan(prop
: IWherePropParam‹Band›, val
: IFirestoreVal): IQueryBuilder‹Band›
Inherited from TransactionRepository.whereLessOrEqualThan
Defined in src/AbstractFirestoreRepository.ts:208
Returns a new QueryBuilder with a filter specifying that the value in @param prop must be less or equal than @param val.
memberof
AbstractFirestoreRepository
Parameters:
Name | Type | Description |
---|---|---|
prop |
IWherePropParam‹Band› | field to be filtered on, where prop could be keyof T or a lambda where T is the first parameter |
val |
IFirestoreVal | value to compare in the filter |
Returns: IQueryBuilder‹Band›
A new QueryBuilder with the specified query applied.
â–¸ whereLessThan(prop
: IWherePropParam‹Band›, val
: IFirestoreVal): IQueryBuilder‹Band›
Inherited from TransactionRepository.whereLessThan
Defined in src/AbstractFirestoreRepository.ts:193
Returns a new QueryBuilder with a filter specifying that the value in @param prop must be less than @param val.
memberof
AbstractFirestoreRepository
Parameters:
Name | Type | Description |
---|---|---|
prop |
IWherePropParam‹Band› | field to be filtered on, where prop could be keyof T or a lambda where T is the first parameter |
val |
IFirestoreVal | value to compare in the filter |
Returns: IQueryBuilder‹Band›
A new QueryBuilder with the specified query applied.