@rentman/rm-core 5.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +8 -0
- package/dist/rm-core.js +8485 -8219
- package/dist/rm-core.min.js +2 -2
- package/dist/types/classes/ApiResponseProcessor.d.ts +2 -2
- package/dist/types/classes/CollectionEntryService.d.ts +7 -6
- package/dist/types/classes/CollectionMatcherBase.d.ts +8 -13
- package/dist/types/classes/CollectionMatcherCachedCollectionProcessor.d.ts +31 -0
- package/dist/types/classes/CollectionResourceService.d.ts +4 -3
- package/dist/types/classes/ColumnSet.d.ts +1 -2
- package/dist/types/classes/ColumnSubsetCache.d.ts +4 -2
- package/dist/types/classes/KeyService.d.ts +2 -1
- package/dist/types/classes/{QueryLocalLinkedToParser.d.ts → QueryLinkedToParser.d.ts} +4 -5
- package/dist/types/classes/QueryLocallyMatchableParser.d.ts +19 -0
- package/dist/types/classes/QueryMatcher.d.ts +4 -0
- package/dist/types/classes/QueryParser.d.ts +1 -2
- package/dist/types/classes/QueryParserBase.d.ts +7 -7
- package/dist/types/classes/QueryParserIdUpdater.d.ts +16 -0
- package/dist/types/classes/QueryService.d.ts +2 -1
- package/dist/types/classes/RequestBuffer.d.ts +7 -7
- package/dist/types/classes/RequestBufferManager.d.ts +1 -0
- package/dist/types/classes/RequestColumnExpansion.d.ts +2 -2
- package/dist/types/classes/SocketMessageHandler.d.ts +14 -6
- package/dist/types/classes/cache/AbstractCache.d.ts +20 -19
- package/dist/types/classes/cache/CachedQueryHandlerBase.d.ts +73 -0
- package/dist/types/classes/cache/CollectionMatcherCachedQueryProcessor.d.ts +35 -0
- package/dist/types/classes/cache/ItemHandlerBase.d.ts +3 -5
- package/dist/types/classes/cache/server/ServerCache.d.ts +12 -13
- package/dist/types/classes/cache/server/ServerCachedQueryHandler.d.ts +34 -0
- package/dist/types/classes/cache/server/ServerItemHandler.d.ts +2 -1
- package/dist/types/classes/cache/transaction/TransactionCache.d.ts +22 -28
- package/dist/types/classes/cache/transaction/TransactionCachedQueryHandler.d.ts +23 -0
- package/dist/types/classes/cache/transaction/TransactionCollectionHandler.d.ts +15 -40
- package/dist/types/classes/cache/transaction/TransactionItemHandler.d.ts +2 -2
- package/dist/types/classes/index.d.ts +3 -3
- package/dist/types/core.d.ts +1 -2
- package/dist/types/factories/CollectionEntryFactory.d.ts +7 -4
- package/dist/types/factories/CollectionMatcherFactory.d.ts +14 -4
- package/dist/types/factories/CollectionResourceFactory.d.ts +10 -4
- package/dist/types/factories/ColumnSubsetCacheFactory.d.ts +3 -2
- package/dist/types/factories/QueryParserFactory.d.ts +1 -1
- package/dist/types/factories/index.d.ts +0 -1
- package/dist/types/interfaces/AbstractCacheDependencyInterface.d.ts +1 -2
- package/dist/types/interfaces/TransactionCollectionHandlerDependencyInterface.d.ts +1 -2
- package/dist/types/models/CollectionEntry.d.ts +7 -8
- package/dist/types/models/CollectionOptions.d.ts +18 -0
- package/dist/types/models/CollectionResource.d.ts +30 -21
- package/dist/types/models/index.d.ts +1 -2
- package/dist/types/types/ItemTypesCollection.d.ts +32 -32
- package/package.json +1 -1
- package/dist/types/classes/CollectionCache.d.ts +0 -38
- package/dist/types/classes/CollectionMatcher.d.ts +0 -9
- package/dist/types/classes/cache/CollectionHandlerBase.d.ts +0 -68
- package/dist/types/classes/cache/CollectionMatcherCacheProcessor.d.ts +0 -26
- package/dist/types/classes/cache/server/ServerCollectionHandler.d.ts +0 -44
- package/dist/types/factories/CollectionCacheFactory.d.ts +0 -8
- package/dist/types/models/CollectionEntryOptions.d.ts +0 -13
- package/dist/types/models/CollectionResourceOptions.d.ts +0 -21
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ApiFormatter } from '../classes';
|
|
2
2
|
import { FieldMap, ItemId, ItemType, ItemTypeMap, ResponseColumn } from '../types';
|
|
3
|
-
export declare class ApiResponseProcessor {
|
|
3
|
+
export declare class ApiResponseProcessor<RequestItemType extends ItemType = any> {
|
|
4
4
|
apiFormatter: ApiFormatter;
|
|
5
5
|
response: any;
|
|
6
|
-
itemType:
|
|
6
|
+
itemType: RequestItemType;
|
|
7
7
|
columns: ItemTypeMap<ResponseColumn[]>;
|
|
8
8
|
links: ItemTypeMap<ItemId[]>;
|
|
9
9
|
cacheable: boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { QueryService } from '../classes';
|
|
2
2
|
import { QueryParserFactory } from '../factories';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ItemEntry } from '../models';
|
|
4
|
+
import { CollectionOptions, CollectionOptionsInterface } from '../models/CollectionOptions';
|
|
5
|
+
import { ApiQuery, CollectionQuery, EntryParentNull, ItemId, ItemType } from '../types';
|
|
5
6
|
export declare class CollectionEntryService {
|
|
6
7
|
private queryParserFactory;
|
|
7
8
|
private queryService;
|
|
@@ -9,10 +10,10 @@ export declare class CollectionEntryService {
|
|
|
9
10
|
createUnfoundLocalCollectionError(itemType: ItemType): {
|
|
10
11
|
message: string;
|
|
11
12
|
};
|
|
12
|
-
cloneOptions(options:
|
|
13
|
-
processOptions<ItemTypeType extends ItemType>(options: CollectionOptionsInterface<ItemTypeType>):
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
cloneOptions(options: CollectionOptions, parent: EntryParentNull): CollectionOptions<any>;
|
|
14
|
+
processOptions<ItemTypeType extends ItemType>(options: CollectionOptionsInterface<ItemTypeType>): CollectionOptions;
|
|
15
|
+
createQuery(query: ApiQuery): CollectionQuery;
|
|
16
|
+
createQueryFromOptions(options: CollectionOptions): CollectionQuery;
|
|
16
17
|
getIdArray(itemEntries: Array<ItemEntry<any>>, accumulator?: ItemId[]): ItemId[];
|
|
17
18
|
/**
|
|
18
19
|
* @description
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AbstractCache, FieldMap, ItemType } from '../';
|
|
1
|
+
import { AbstractCache, CollectionQuery, FieldMap, ItemType, QueryService } from '../';
|
|
2
2
|
import { QueryMatcherFactory } from '../factories/';
|
|
3
|
-
import {
|
|
3
|
+
import { ItemEntry } from '../models';
|
|
4
|
+
import { GroupedCollectionMatcherResult } from './cache/CollectionMatcherCachedQueryProcessor';
|
|
4
5
|
import { InternalChangesDelta } from './InternalChangesDelta';
|
|
5
6
|
export declare type CollectionMatcherMatches<ItemTypeType extends ItemType = ItemType> = {
|
|
6
7
|
[itemId: number]: {
|
|
@@ -8,19 +9,13 @@ export declare type CollectionMatcherMatches<ItemTypeType extends ItemType = Ite
|
|
|
8
9
|
isMatch: boolean | 'maybe';
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
|
-
export declare class CollectionMatcherBase {
|
|
12
|
+
export declare abstract class CollectionMatcherBase {
|
|
13
|
+
protected queryService: QueryService;
|
|
12
14
|
protected queryMatcherFactory: QueryMatcherFactory;
|
|
13
15
|
protected transaction: AbstractCache;
|
|
14
|
-
|
|
15
|
-
protected map: {
|
|
16
|
-
[collectionEntryId: number]: {
|
|
17
|
-
collection: CollectionEntry;
|
|
18
|
-
matches: CollectionMatcherMatches;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
constructor(queryMatcherFactory: QueryMatcherFactory, transaction: AbstractCache, getCollectionEntries: (itemType: ItemType) => CollectionEntry[]);
|
|
16
|
+
protected constructor(queryService: QueryService, queryMatcherFactory: QueryMatcherFactory, transaction: AbstractCache);
|
|
22
17
|
expand<ItemEntryType extends ItemEntry>(itemEntry: ItemEntryType, fields: FieldMap<ItemEntryType['itemType']>): this;
|
|
23
18
|
processDelta(internalChangesDelta: InternalChangesDelta): this;
|
|
24
|
-
protected
|
|
25
|
-
protected _expand(itemEntry: ItemEntry
|
|
19
|
+
protected groupItemEntries<ItemTypeType extends ItemType>(matches: CollectionMatcherMatches<ItemTypeType>): GroupedCollectionMatcherResult<ItemTypeType>;
|
|
20
|
+
protected abstract _expand<ItemTypeType extends ItemType = string>(itemEntry: ItemEntry<ItemTypeType>, matchFunction: (itemType: ItemTypeType, parsedQuery: CollectionQuery) => boolean | 'maybe'): this;
|
|
26
21
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { QueryMatcherFactory } from '../factories';
|
|
2
|
+
import { PromiseLibraryInterface } from '../interfaces';
|
|
3
|
+
import { CollectionResource, ItemEntry } from '../models';
|
|
4
|
+
import { CollectionQuery, ItemType, PromiseInterface } from '../types';
|
|
5
|
+
import { ApiRequestService } from './ApiRequestService';
|
|
6
|
+
import { AbstractCache } from './cache/AbstractCache';
|
|
7
|
+
import { ChangesDeltaBase } from './ChangesDeltaBase';
|
|
8
|
+
import { CollectionMatcherBase, CollectionMatcherMatches } from './CollectionMatcherBase';
|
|
9
|
+
import { QueryService } from './QueryService';
|
|
10
|
+
/**
|
|
11
|
+
* @description
|
|
12
|
+
* Processes all {@link CollectionResource CollectionResources} and adds/removes item entries that do/don't fit the query
|
|
13
|
+
*/
|
|
14
|
+
export declare class CollectionMatcherCachedCollectionProcessor extends CollectionMatcherBase {
|
|
15
|
+
private apiRequestService;
|
|
16
|
+
private promiseService;
|
|
17
|
+
private getCollections;
|
|
18
|
+
protected map: {
|
|
19
|
+
[itemTypeAndQueryString: string]: {
|
|
20
|
+
itemType: ItemType;
|
|
21
|
+
query: CollectionQuery;
|
|
22
|
+
collectionResources: CollectionResource[];
|
|
23
|
+
matches: CollectionMatcherMatches;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
constructor(apiRequestService: ApiRequestService, promiseService: PromiseLibraryInterface, queryService: QueryService, queryMatcherFactory: QueryMatcherFactory, transaction: AbstractCache, getCollections: (itemType: ItemType) => {
|
|
27
|
+
[queryString: string]: CollectionResource[];
|
|
28
|
+
});
|
|
29
|
+
__removeFromAndAddToCollections(isCalledAfterSocketUpdate?: boolean, changesDelta?: ChangesDeltaBase): PromiseInterface<void[]>;
|
|
30
|
+
protected _expand<ItemTypeType extends ItemType = string>(itemEntry: ItemEntry<ItemTypeType>, matchFunction: (itemType: ItemTypeType, parsedQuery: CollectionQuery) => boolean | 'maybe'): this;
|
|
31
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CollectionOptions, ItemResource } from '../models';
|
|
2
|
+
import { CollectionOptionsInterface } from '../models/CollectionOptions';
|
|
2
3
|
import { ItemId, ItemType } from '../types';
|
|
3
4
|
export declare class CollectionResourceService {
|
|
4
|
-
processOptions<ItemTypeType extends ItemType>(options:
|
|
5
|
-
getIdArray(itemResources:
|
|
5
|
+
processOptions<ItemTypeType extends ItemType>(options: CollectionOptionsInterface<ItemTypeType>): CollectionOptions<ItemTypeType>;
|
|
6
|
+
getIdArray(itemResources: ItemResource[]): ItemId[];
|
|
6
7
|
}
|
|
@@ -29,8 +29,7 @@ export declare class ColumnSet<ItemTypeType extends ItemType = any> {
|
|
|
29
29
|
main: string[];
|
|
30
30
|
derived: string[];
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
isSupersetOf(columns: ApiRequestColumns): boolean;
|
|
32
|
+
isSupersetOf(columnsToCompare: ApiRequestColumns): boolean;
|
|
34
33
|
private getMergedColumnSet;
|
|
35
34
|
mergeRequestColumns(requestColumns: ApiRequestColumns): RequestColumnMergeResult;
|
|
36
35
|
mergeResponseColumns(responseColumns: ResponseColumnItemTypeMap): ResponseColumnItemTypeMap;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { ColumnSet } from '../classes';
|
|
1
|
+
import { ColumnSet, ColumnUtil } from '../classes';
|
|
2
2
|
import { ApiRequestColumns, ItemType } from '../types';
|
|
3
3
|
export declare class ColumnSubsetCache<ItemTypeType extends ItemType> {
|
|
4
|
+
private columnUtil;
|
|
4
5
|
requestColumns: ApiRequestColumns;
|
|
5
6
|
private cache;
|
|
6
|
-
constructor(requestColumns: ApiRequestColumns);
|
|
7
|
+
constructor(columnUtil: ColumnUtil, requestColumns: ApiRequestColumns);
|
|
7
8
|
run(columnSet: ColumnSet<ItemTypeType>): boolean;
|
|
9
|
+
runWithRequestColumns(cachedRequestColumns: ApiRequestColumns): boolean;
|
|
8
10
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { ApiQuery, ItemType } from '../types';
|
|
2
|
-
import { KeyService } from './KeyService';
|
|
3
2
|
import { COMPARATORS_TYPE } from './QueryParser';
|
|
4
3
|
import { OPERATORS_TYPE, QueryParserBase } from './QueryParserBase';
|
|
5
|
-
export declare class
|
|
6
|
-
private
|
|
7
|
-
constructor(
|
|
4
|
+
export declare class QueryLinkedToParser extends QueryParserBase<boolean> {
|
|
5
|
+
private callback;
|
|
6
|
+
constructor(callback: (linkedTo: ItemType, query: ApiQuery) => boolean, query: ApiQuery);
|
|
8
7
|
protected parseEmptyQuery(): boolean;
|
|
9
8
|
protected parseSubQuery(_key: string, subQuery: object, _not?: boolean): boolean;
|
|
10
9
|
protected parseSubFieldQuery(_key: string, _itemType: ItemType, _field: string, _query: ApiQuery, _not: boolean): boolean;
|
|
11
10
|
protected parseSearchQuery(_value: any, _not: boolean): boolean;
|
|
12
11
|
protected parseCustomQuery(_custom: string, _parameters: any, _not?: boolean): boolean;
|
|
13
12
|
protected parseSimpleQuery(_key: string, _value: any, _comparator?: COMPARATORS_TYPE, _not?: boolean): boolean;
|
|
14
|
-
protected parseLinkedToQuery(
|
|
13
|
+
protected parseLinkedToQuery(linkedTo: ItemType, query?: ApiQuery, _reverse?: boolean, not?: boolean): boolean;
|
|
15
14
|
protected parseComplexQuery(conditions: any[], _operator?: OPERATORS_TYPE, _not?: boolean): boolean;
|
|
16
15
|
private parseConditions;
|
|
17
16
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ApiQuery, ItemType } from '../types';
|
|
2
|
+
import { COMPARATORS_TYPE } from './QueryParser';
|
|
3
|
+
import { OPERATORS_TYPE, QueryParserBase } from './QueryParserBase';
|
|
4
|
+
/**
|
|
5
|
+
* @description
|
|
6
|
+
* Returns whether or not a query can be parsed by the {@link QueryMatcher QueryMatcher}
|
|
7
|
+
*/
|
|
8
|
+
export declare class QueryLocallyMatchableParser extends QueryParserBase<boolean> {
|
|
9
|
+
constructor(query: ApiQuery);
|
|
10
|
+
protected parseEmptyQuery(): boolean;
|
|
11
|
+
protected parseSubQuery(_key: string, _subQuery: object, _not?: boolean): boolean;
|
|
12
|
+
protected parseSubFieldQuery(_key: string, _itemType: ItemType, _field: string, _query: ApiQuery, _not: boolean): boolean;
|
|
13
|
+
protected parseSearchQuery(_value: any, _not: boolean): boolean;
|
|
14
|
+
protected parseCustomQuery(_custom: string, _parameters: any, _not?: boolean): boolean;
|
|
15
|
+
protected parseSimpleQuery(_key: string, _value: any, _comparator?: COMPARATORS_TYPE, _not?: boolean): boolean;
|
|
16
|
+
protected parseLinkedToQuery(_linkedTo: ItemType, _query?: ApiQuery, _reverse?: boolean, _not?: boolean): boolean;
|
|
17
|
+
protected parseComplexQuery(conditions: any[], _operator?: OPERATORS_TYPE, _not?: boolean): boolean;
|
|
18
|
+
private parseConditions;
|
|
19
|
+
}
|
|
@@ -7,6 +7,10 @@ export declare class QueryMatcher {
|
|
|
7
7
|
parent: EntryParentNull;
|
|
8
8
|
constructor(apiFormatter: ApiFormatter, itemType: ItemType, fields: FieldMap, parent?: EntryParentNull);
|
|
9
9
|
private compareValues;
|
|
10
|
+
/**
|
|
11
|
+
* @remark
|
|
12
|
+
* When changing this code also change {@link QueryLocallyMatchableParser QueryLocallyMatchableParser}
|
|
13
|
+
*/
|
|
10
14
|
matchQuery(query: ApiQuery): boolean | 'maybe';
|
|
11
15
|
private matchLinkedToQuery;
|
|
12
16
|
private matchComplexQuery;
|
|
@@ -7,8 +7,7 @@ export declare enum CONSTANTS {
|
|
|
7
7
|
}
|
|
8
8
|
export declare type COMPARATORS_TYPE = '=' | '!=' | '<' | '>' | '<=' | '>=' | 'IN' | COMPARATORS;
|
|
9
9
|
export declare class QueryParser extends QueryParserBase<[object, string]> {
|
|
10
|
-
|
|
11
|
-
constructor(query: ApiQuery, parameters: object);
|
|
10
|
+
constructor(query: ApiQuery);
|
|
12
11
|
protected parseEmptyQuery(): [object, string];
|
|
13
12
|
protected parseSubQuery(key: string, subQuery: object, not?: boolean): [object, string];
|
|
14
13
|
protected parseSubFieldQuery(key: string | undefined, itemType: string | undefined, field: string | undefined, query: ApiQuery, not?: boolean): [object, string];
|
|
@@ -19,11 +19,11 @@ export declare abstract class QueryParserBase<ReturnType extends any> {
|
|
|
19
19
|
protected constructor(query: ApiQuery);
|
|
20
20
|
parse(query?: ApiQuery): ReturnType;
|
|
21
21
|
protected abstract parseEmptyQuery(): ReturnType;
|
|
22
|
-
protected abstract parseSubQuery(key: string, subQuery: object, not: boolean): ReturnType;
|
|
23
|
-
protected abstract parseSubFieldQuery(key: string, itemType: ItemType, field: string, query: ApiQuery, not: boolean): ReturnType;
|
|
24
|
-
protected abstract parseSearchQuery(value: any, not: boolean): ReturnType;
|
|
25
|
-
protected abstract parseCustomQuery(custom: string, parameters: any, not: boolean): ReturnType;
|
|
26
|
-
protected abstract parseSimpleQuery(key: string, value: any, comparator: COMPARATORS_TYPE, not
|
|
27
|
-
protected abstract parseLinkedToQuery(linkedTo: any, query: ApiQuery, reverse: boolean, not: boolean): ReturnType;
|
|
28
|
-
protected abstract parseComplexQuery(conditions: any[], operator: OPERATORS_TYPE, not: boolean): ReturnType;
|
|
22
|
+
protected abstract parseSubQuery(key: string, subQuery: object, not: boolean, queryPart: ApiQuery): ReturnType;
|
|
23
|
+
protected abstract parseSubFieldQuery(key: string, itemType: ItemType, field: string, query: ApiQuery, not: boolean, queryPart: ApiQuery): ReturnType;
|
|
24
|
+
protected abstract parseSearchQuery(value: any, not: boolean, queryPart: ApiQuery): ReturnType;
|
|
25
|
+
protected abstract parseCustomQuery(custom: string, parameters: any, not: boolean, queryPart: ApiQuery): ReturnType;
|
|
26
|
+
protected abstract parseSimpleQuery(key: string, value: any, comparator: COMPARATORS_TYPE, not: boolean, queryPart: ApiQuery): ReturnType;
|
|
27
|
+
protected abstract parseLinkedToQuery(linkedTo: any, query: ApiQuery, reverse: boolean, not: boolean, queryPart: ApiQuery): ReturnType;
|
|
28
|
+
protected abstract parseComplexQuery(conditions: any[], operator: OPERATORS_TYPE, not: boolean, queryPart: ApiQuery): ReturnType;
|
|
29
29
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApiQuery, ItemIdConversionMap, ItemType } from '../types';
|
|
2
|
+
import { COMPARATORS_TYPE } from './QueryParser';
|
|
3
|
+
import { OPERATORS_TYPE, QueryParserBase } from './QueryParserBase';
|
|
4
|
+
export declare class QueryParserIdUpdater extends QueryParserBase<void> {
|
|
5
|
+
private itemIdConversionMap;
|
|
6
|
+
constructor(itemIdConversionMap: ItemIdConversionMap, query: ApiQuery);
|
|
7
|
+
protected parseEmptyQuery(): void;
|
|
8
|
+
protected parseSubQuery(_key: string, subQuery: object, _not?: boolean): void;
|
|
9
|
+
protected parseSubFieldQuery(_key: string, _itemType: ItemType, _field: string, _query: ApiQuery, _not: boolean): void;
|
|
10
|
+
protected parseSearchQuery(_value: any, _not: boolean): void;
|
|
11
|
+
protected parseCustomQuery(_custom: string, _parameters: any, _not?: boolean): void;
|
|
12
|
+
protected parseSimpleQuery(_key: string, value: any, _comparator: COMPARATORS_TYPE, _not: boolean, queryPart: ApiQuery): void;
|
|
13
|
+
protected parseLinkedToQuery(_linkedTo: ItemType, query?: ApiQuery, _reverse?: boolean, _not?: boolean): void;
|
|
14
|
+
protected parseComplexQuery(conditions: any[], _operator?: OPERATORS_TYPE, _not?: boolean): void;
|
|
15
|
+
private parseConditions;
|
|
16
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ApiQuery, EntryParentNull, ItemId } from '../types';
|
|
1
|
+
import { ApiQuery, EntryParentNull, ItemId, ItemType } from '../types';
|
|
2
2
|
import { KeyService } from './KeyService';
|
|
3
3
|
import { COMPARATORS } from './QueryParserBase';
|
|
4
4
|
export declare class QueryService {
|
|
5
5
|
private keyService;
|
|
6
6
|
constructor(keyService: KeyService);
|
|
7
|
+
containsLinkedTo(query: ApiQuery, matchItemType: ItemType, matchItemId: ItemId): boolean;
|
|
7
8
|
containsLocalLinkedTo(query: ApiQuery): boolean;
|
|
8
9
|
addAndCondition(query: ApiQuery, condition: ApiQuery): ApiQuery;
|
|
9
10
|
addOrCondition(query: ApiQuery, condition: ApiQuery): ApiQuery;
|
|
@@ -4,8 +4,8 @@ import { ApiRequestColumns, ItemId, ItemType, PromiseInterface } from '../types'
|
|
|
4
4
|
import { ApiRequestService } from './ApiRequestService';
|
|
5
5
|
import { ApiResponseProcessor } from './ApiResponseProcessor';
|
|
6
6
|
import { ServerCache } from './cache/server/ServerCache';
|
|
7
|
-
export declare type RequestBufferResponse = ApiResponseProcessor
|
|
8
|
-
export declare class RequestBuffer {
|
|
7
|
+
export declare type RequestBufferResponse<ItemTypeType extends ItemType = any> = ApiResponseProcessor<ItemTypeType>;
|
|
8
|
+
export declare class RequestBuffer<ItemTypeType extends ItemType = any> {
|
|
9
9
|
private promiseLibrary;
|
|
10
10
|
private apiRequestService;
|
|
11
11
|
private requestColumnExpansionFactory;
|
|
@@ -16,13 +16,13 @@ export declare class RequestBuffer {
|
|
|
16
16
|
private requestColumnExpansion;
|
|
17
17
|
private singleItemIds;
|
|
18
18
|
private queries;
|
|
19
|
-
constructor(promiseLibrary: PromiseLibraryInterface, apiRequestService: ApiRequestService, requestColumnExpansionFactory: RequestColumnExpansionFactory, changesDeltaFactory: ChangesDeltaFactory, serverCache: ServerCache, itemType:
|
|
19
|
+
constructor(promiseLibrary: PromiseLibraryInterface, apiRequestService: ApiRequestService, requestColumnExpansionFactory: RequestColumnExpansionFactory, changesDeltaFactory: ChangesDeltaFactory, serverCache: ServerCache, itemType: ItemTypeType);
|
|
20
20
|
containsId(itemId: ItemId): boolean;
|
|
21
21
|
containsQuery(queryString: string): boolean;
|
|
22
|
-
addSingleItem(itemId: ItemId, requestColumns: ApiRequestColumns): PromiseInterface<RequestBufferResponse
|
|
23
|
-
addQuery(query: [object, string], requestColumns: ApiRequestColumns): PromiseInterface<RequestBufferResponse
|
|
24
|
-
flush(): PromiseInterface<RequestBufferResponse
|
|
25
|
-
getPromise(): PromiseInterface<RequestBufferResponse
|
|
22
|
+
addSingleItem(itemId: ItemId, requestColumns: ApiRequestColumns): PromiseInterface<RequestBufferResponse<ItemTypeType>>;
|
|
23
|
+
addQuery(query: [object, string], requestColumns: ApiRequestColumns): PromiseInterface<RequestBufferResponse<ItemTypeType>>;
|
|
24
|
+
flush(): PromiseInterface<RequestBufferResponse<ItemTypeType>>;
|
|
25
|
+
getPromise(): PromiseInterface<RequestBufferResponse<ItemTypeType>>;
|
|
26
26
|
private hasMultipleQueries;
|
|
27
27
|
private getFirstQueryString;
|
|
28
28
|
}
|
|
@@ -21,4 +21,5 @@ export declare class RequestBufferManager {
|
|
|
21
21
|
fetchByQuery(itemType: ItemType, query: [object, string], // queryParser result
|
|
22
22
|
requestColumns: ApiRequestColumns): PromiseInterface<RequestBufferResponse>;
|
|
23
23
|
private constructBuffer;
|
|
24
|
+
private _constructBuffer;
|
|
24
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColumnSet, ColumnUtil } from '../classes';
|
|
1
|
+
import { ColumnSet, ColumnUtil, RequestColumnMergeResult } from '../classes';
|
|
2
2
|
import { ApiRequestColumns, ItemType } from '../types';
|
|
3
3
|
declare type RequestColumnMap = {
|
|
4
4
|
[itemType: string]: ApiRequestColumns;
|
|
@@ -8,7 +8,7 @@ export declare class RequestColumnExpansion {
|
|
|
8
8
|
private columns;
|
|
9
9
|
private columnSetIdMap;
|
|
10
10
|
constructor(columnUtil: ColumnUtil);
|
|
11
|
-
expandWithRequestColumns(itemType: ItemType, requestColumns: ApiRequestColumns):
|
|
11
|
+
expandWithRequestColumns(itemType: ItemType, requestColumns: ApiRequestColumns): RequestColumnMergeResult;
|
|
12
12
|
expand<T extends ColumnSet<ItemType>>(columnSet: T): void;
|
|
13
13
|
get(): RequestColumnMap;
|
|
14
14
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { ApiFormatter, ApiRequestService } from '../classes';
|
|
2
|
-
import { RequestColumnExpansionFactory, TransactionCacheFactory } from '../factories';
|
|
2
|
+
import { QueryMatcherFactory, RequestColumnExpansionFactory, TransactionCacheFactory } from '../factories';
|
|
3
3
|
import { ChangesDeltaFactory } from '../factories/ChangesDeltaFactory';
|
|
4
4
|
import { ErrorHandlerInterface, PromiseLibraryInterface } from '../interfaces';
|
|
5
|
-
import {
|
|
5
|
+
import { ItemType, SocketMessage } from '../types';
|
|
6
|
+
import { CachedQueryItem } from './cache/CachedQueryHandlerBase';
|
|
6
7
|
import { RequestBufferManager } from './RequestBufferManager';
|
|
7
|
-
export declare type
|
|
8
|
-
|
|
8
|
+
export declare type CachedQueryMatchingResult<ItemTypeType extends ItemType> = {
|
|
9
|
+
fitting: Array<CachedQueryItem<ItemTypeType>>;
|
|
10
|
+
notfitting: Array<CachedQueryItem<ItemTypeType>>;
|
|
11
|
+
maybe: Array<CachedQueryItem<ItemTypeType>>;
|
|
12
|
+
};
|
|
13
|
+
export declare type CachedQueryMatchingResultItemIdMap<ItemTypeType extends ItemType> = {
|
|
14
|
+
[itemId: number]: CachedQueryMatchingResult<ItemTypeType>;
|
|
9
15
|
};
|
|
10
16
|
export declare class SocketMessageHandler {
|
|
11
17
|
private requestBufferManager;
|
|
@@ -16,10 +22,12 @@ export declare class SocketMessageHandler {
|
|
|
16
22
|
private promiseService;
|
|
17
23
|
private requestColumnExpansionFactory;
|
|
18
24
|
private apiRequestService;
|
|
19
|
-
|
|
25
|
+
private queryMatcherFactory;
|
|
26
|
+
constructor(requestBufferManager: RequestBufferManager, changesDeltaFactory: ChangesDeltaFactory, apiFormatter: ApiFormatter, errorHandler: ErrorHandlerInterface, transactionCacheFactory: TransactionCacheFactory, promiseService: PromiseLibraryInterface, requestColumnExpansionFactory: RequestColumnExpansionFactory, apiRequestService: ApiRequestService, queryMatcherFactory: QueryMatcherFactory);
|
|
20
27
|
onMessageReceived(message: SocketMessage): any;
|
|
21
28
|
private formatMessageValues;
|
|
22
|
-
private
|
|
29
|
+
private createQueriesWithFittingItemsMap;
|
|
30
|
+
private getCachedQueriesByFittingItem;
|
|
23
31
|
private getRequestColumns;
|
|
24
32
|
private processMessage;
|
|
25
33
|
private processFunctionChangesResolve;
|
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
import { RmCore } from '../../core';
|
|
2
2
|
import { AbstractCacheDependencyInterface } from '../../interfaces';
|
|
3
|
-
import {
|
|
4
|
-
import { EntryParentNull, FieldMap, ItemIdConversionMap, ItemType, PromiseInterface } from '../../types';
|
|
3
|
+
import { ItemEntry } from '../../models';
|
|
4
|
+
import { ApiRequestColumn, CollectionQuery, CollectionResourceParentIdMap, EntryParentNull, FieldMap, ItemIdConversionMap, ItemType, PromiseInterface } from '../../types';
|
|
5
5
|
import { ChangesDelta } from '../ChangesDelta';
|
|
6
6
|
import { ChangesDeltaResult } from '../ChangesDeltaBase';
|
|
7
7
|
import { OnAfterCreateCallback } from '../ChangesProcessor';
|
|
8
|
-
import { CollectionCache } from '../CollectionCache';
|
|
9
8
|
import { InternalChangesDelta } from '../InternalChangesDelta';
|
|
10
9
|
import { ItemCache } from '../ItemCache';
|
|
10
|
+
import { CachedQueryItem } from './CachedQueryHandlerBase';
|
|
11
|
+
import { ItemHandlerBase } from './ItemHandlerBase';
|
|
11
12
|
import { ServerCache } from './server/ServerCache';
|
|
12
|
-
import {
|
|
13
|
-
import { ServerItemEntryChanges
|
|
13
|
+
import { ServerCachedQueryHandler } from './server/ServerCachedQueryHandler';
|
|
14
|
+
import { ServerItemEntryChanges } from './server/ServerItemHandler';
|
|
14
15
|
import { TransactionCache } from './transaction/TransactionCache';
|
|
15
|
-
import {
|
|
16
|
-
import { TransactionItemEntryChanges
|
|
16
|
+
import { TransactionCachedQueryHandler } from './transaction/TransactionCachedQueryHandler';
|
|
17
|
+
import { TransactionItemEntryChanges } from './transaction/TransactionItemHandler';
|
|
17
18
|
import { TransactionValidatorFactory } from './transaction/TransactionValidator';
|
|
18
19
|
export declare abstract class AbstractCache {
|
|
19
|
-
|
|
20
|
+
dependencies: AbstractCacheDependencyInterface;
|
|
20
21
|
core: RmCore;
|
|
21
22
|
children: TransactionCache[];
|
|
22
|
-
readonly itemHandler:
|
|
23
|
-
readonly
|
|
23
|
+
readonly itemHandler: ItemHandlerBase;
|
|
24
|
+
readonly cachedQueryHandler: TransactionCachedQueryHandler | ServerCachedQueryHandler;
|
|
24
25
|
parent: AbstractCache | null;
|
|
25
26
|
protected constructor(dependencies: AbstractCacheDependencyInterface, core: RmCore);
|
|
26
|
-
createChild(id?: string, validatorFactory?: TransactionValidatorFactory): TransactionCache;
|
|
27
|
+
abstract createChild(id?: string, validatorFactory?: TransactionValidatorFactory): TransactionCache;
|
|
27
28
|
onChildDestroy(cache: TransactionCache): void;
|
|
28
|
-
abstract getLocalCollectionEntryByQueryString(itemType: ItemType, queryString: string): CollectionEntry | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* @description
|
|
31
|
-
*
|
|
31
|
+
* Expands the items in the collections with the passed columns
|
|
32
|
+
*
|
|
33
|
+
* todo[limit] move to TransactionCache ?
|
|
32
34
|
*/
|
|
33
|
-
abstract
|
|
35
|
+
abstract expandCollectionResources<ItemTypeType extends ItemType>(itemType: ItemTypeType, collections: CollectionResourceParentIdMap<ItemTypeType>, newColumns: ApiRequestColumn[]): PromiseInterface<CollectionResourceParentIdMap>;
|
|
34
36
|
/**
|
|
35
37
|
* @description
|
|
36
|
-
* Returns
|
|
38
|
+
* Returns {@link ItemEntry ItemEntries} that fit the collection's query, copies over the collectionChanges on all transactions in the chain.
|
|
37
39
|
*/
|
|
38
|
-
|
|
40
|
+
abstract getCollectionChangesRecursively<ItemTypeType extends ItemType>(itemType: ItemTypeType, parsedQuery: CollectionQuery): CachedQueryItem<ItemTypeType> | undefined;
|
|
39
41
|
/**
|
|
40
42
|
* @description
|
|
41
|
-
* Returns
|
|
43
|
+
* Returns this transaction and all parents
|
|
42
44
|
*/
|
|
43
|
-
|
|
45
|
+
getTransactionChain(): AbstractCache[];
|
|
44
46
|
/**
|
|
45
47
|
* @description
|
|
46
48
|
* Returns the {@link TransactionItemHandler.entries ItemCache} of the transaction
|
|
@@ -49,7 +51,6 @@ export declare abstract class AbstractCache {
|
|
|
49
51
|
abstract getServerCache(): ServerCache;
|
|
50
52
|
abstract getLocalItemEntry(itemEntryId: ItemEntry['id']): ItemEntry | undefined;
|
|
51
53
|
abstract getLocalItemEntryByItemId(itemType: ItemType, itemId: ItemEntry['itemId']): ItemEntry | undefined;
|
|
52
|
-
abstract getLocalCollectionEntry(collectionEntryId: CollectionEntry['id']): CollectionEntry | undefined;
|
|
53
54
|
/**
|
|
54
55
|
* @description
|
|
55
56
|
* Applies changes from a child transaction to a parent
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { RequestColumnExpansionFactory } from '../../factories';
|
|
2
|
+
import { Deferred, PromiseLibraryInterface } from '../../interfaces';
|
|
3
|
+
import { ItemEntry } from '../../models';
|
|
4
|
+
import { CollectionOptions } from '../../models/CollectionOptions';
|
|
5
|
+
import { ApiQuery, ApiRequestColumns, CollectionQuery, ItemId, ItemType, ParentIdMap, PromiseInterface } from '../../types';
|
|
6
|
+
import { CollectionEntryService } from '../CollectionEntryService';
|
|
7
|
+
import { ColumnSubsetCache } from '../ColumnSubsetCache';
|
|
8
|
+
import { ColumnUtil } from '../ColumnUtil';
|
|
9
|
+
import { AbstractCache } from './AbstractCache';
|
|
10
|
+
export declare type CachedQueryItem<ItemTypeType extends ItemType = any> = {
|
|
11
|
+
itemType: ItemTypeType;
|
|
12
|
+
query: CollectionQuery;
|
|
13
|
+
items: Array<ItemEntry<ItemTypeType>>;
|
|
14
|
+
requestColumns: ApiRequestColumns;
|
|
15
|
+
deferred: Deferred<CachedQueryItem<ItemTypeType>>;
|
|
16
|
+
promise: PromiseInterface<CachedQueryItem<ItemTypeType>>;
|
|
17
|
+
};
|
|
18
|
+
export declare abstract class CachedQueryHandlerBase {
|
|
19
|
+
protected collectionEntryService: CollectionEntryService;
|
|
20
|
+
protected columnUtil: ColumnUtil;
|
|
21
|
+
protected requestColumnExpansionFactory: RequestColumnExpansionFactory;
|
|
22
|
+
protected promiseService: PromiseLibraryInterface;
|
|
23
|
+
protected transaction: AbstractCache;
|
|
24
|
+
/**
|
|
25
|
+
* @description
|
|
26
|
+
* Items (per ItemType) that fit in a query
|
|
27
|
+
*
|
|
28
|
+
* @remark
|
|
29
|
+
* Contains the requestColumns so that new items can include these columns (saving requests when they match)
|
|
30
|
+
*/
|
|
31
|
+
cachedQueries: {
|
|
32
|
+
[itemType: string]: {
|
|
33
|
+
[queryString: string]: CachedQueryItem;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
protected constructor(collectionEntryService: CollectionEntryService, columnUtil: ColumnUtil, requestColumnExpansionFactory: RequestColumnExpansionFactory, promiseService: PromiseLibraryInterface, transaction: AbstractCache);
|
|
37
|
+
setCachedQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, parsedQuery: CollectionQuery, itemEntries: Array<ItemEntry<ItemTypeType>>, requestColumns: ApiRequestColumns): CachedQueryItem<ItemTypeType>;
|
|
38
|
+
getCachedQueryItems<ItemTypeType extends ItemType>(itemType: ItemTypeType, queryString: string): undefined | Array<ItemEntry<ItemTypeType>>;
|
|
39
|
+
getCachedQueryObjectsByItemType(itemType: ItemType): CachedQueryItem[];
|
|
40
|
+
initCachedQuery<ItemTypeType extends ItemType = string>(itemType: ItemTypeType, parsedQuery: CollectionQuery, requestColumns: ApiRequestColumns): CachedQueryItem<ItemTypeType>;
|
|
41
|
+
/**
|
|
42
|
+
* @description
|
|
43
|
+
* Fetches a {@link CollectionEntry CollectionEntry} with the given options
|
|
44
|
+
*/
|
|
45
|
+
abstract __fetchCachedQueryItem<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptions): PromiseInterface<CachedQueryItem<ItemTypeType>>;
|
|
46
|
+
/**
|
|
47
|
+
* @description
|
|
48
|
+
* Fetches collections linked to the passed parents
|
|
49
|
+
*/
|
|
50
|
+
abstract __fetchItemEntriesByQueryData<ItemTypeType extends ItemType>(itemType: ItemTypeType, options: CollectionOptions<ItemTypeType>, columnSubsetCache: ColumnSubsetCache<ItemTypeType>, collectionQuery: CollectionQuery): PromiseInterface<CachedQueryItem<ItemTypeType>>;
|
|
51
|
+
/**
|
|
52
|
+
* @description
|
|
53
|
+
* Fetches collections linked to the passed parents
|
|
54
|
+
*/
|
|
55
|
+
abstract __fetchLinkedCachedQueryItems<ItemTypeType extends ItemType>(parentType: ItemType, parentIdArray: ItemId[] | (() => ItemId[]), itemType: ItemTypeType, options: CollectionOptions): PromiseInterface<ParentIdMap<CachedQueryItem<ItemTypeType>>>;
|
|
56
|
+
/**
|
|
57
|
+
* @description
|
|
58
|
+
* Adds the passed {@link ItemEntry ItemEntries} to the Transaction's query cache,
|
|
59
|
+
* will skip the ItemEntry if the `skipEntryFilterFn` callback returns `true`
|
|
60
|
+
*/
|
|
61
|
+
protected __addItemEntriesToCachedQueries<ItemTypeType extends ItemType>(itemType: ItemTypeType, parsedQuery: CollectionQuery, itemEntries: Array<ItemEntry<ItemTypeType>>, skipEntryFilterFn: (temEntry: ItemEntry) => boolean): void;
|
|
62
|
+
/**
|
|
63
|
+
* @description
|
|
64
|
+
* Removes the passed {@link ItemId ItemIds} from the Transaction's query cache
|
|
65
|
+
*/
|
|
66
|
+
__removeItemEntriesFromCachedQueries<ItemTypeType extends ItemType>(itemType: ItemTypeType, parsedQuery: CollectionQuery, itemEntries: Array<ItemEntry<ItemTypeType>>): Array<ItemEntry<ItemTypeType>>;
|
|
67
|
+
/**
|
|
68
|
+
* @description
|
|
69
|
+
* Expands the option's {@link CollectionOptions.columns columns} with the columns required for the {@link CollectionMatcherCachedCollectionProcessor CollectionMatcher} to function.
|
|
70
|
+
* Data fetched for a parent transaction might also fit in a child transaction, so those {@link CollectionOptions.queryColumns queryColumns} should also be taken into account
|
|
71
|
+
*/
|
|
72
|
+
expandColumnsWithQueryColumns(itemType: ItemType, options: CollectionOptions, query: ApiQuery): void;
|
|
73
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { QueryMatcherFactory } from '../../factories';
|
|
2
|
+
import { PromiseLibraryInterface } from '../../interfaces';
|
|
3
|
+
import { ItemEntry } from '../../models';
|
|
4
|
+
import { CollectionQuery, ItemType, PromiseInterface } from '../../types';
|
|
5
|
+
import { ApiRequestService } from '../ApiRequestService';
|
|
6
|
+
import { ChangesDeltaBase } from '../ChangesDeltaBase';
|
|
7
|
+
import { CollectionMatcherBase, CollectionMatcherMatches } from '../CollectionMatcherBase';
|
|
8
|
+
import { QueryService } from '../QueryService';
|
|
9
|
+
import { AbstractCache } from './AbstractCache';
|
|
10
|
+
import { CachedQueryItem } from './CachedQueryHandlerBase';
|
|
11
|
+
export declare type GroupedCollectionMatcherResult<ItemTypeType extends ItemType> = {
|
|
12
|
+
fitting: Array<ItemEntry<ItemTypeType>>;
|
|
13
|
+
notFitting: Array<ItemEntry<ItemTypeType>>;
|
|
14
|
+
maybe: Array<ItemEntry<ItemTypeType>>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @description
|
|
18
|
+
* Processes all cached queries and adds/removes item entries that do/don't fit the query
|
|
19
|
+
*/
|
|
20
|
+
export declare class CollectionMatcherCachedQueryProcessor extends CollectionMatcherBase {
|
|
21
|
+
private apiRequestService;
|
|
22
|
+
private promiseService;
|
|
23
|
+
private getQueries;
|
|
24
|
+
protected map: {
|
|
25
|
+
[itemTypeAndQueryString: string]: {
|
|
26
|
+
itemType: ItemType;
|
|
27
|
+
query: CollectionQuery;
|
|
28
|
+
matches: CollectionMatcherMatches;
|
|
29
|
+
cachedQuery: CachedQueryItem;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
constructor(apiRequestService: ApiRequestService, promiseService: PromiseLibraryInterface, queryService: QueryService, queryMatcherFactory: QueryMatcherFactory, transaction: AbstractCache, getQueries: (itemType: ItemType) => CachedQueryItem[]);
|
|
33
|
+
__removeFromAndAddToCachedQueries(_isCalledAfterSocketUpdate?: boolean, changesDelta?: ChangesDeltaBase): PromiseInterface<void[]>;
|
|
34
|
+
protected _expand<ItemTypeType extends ItemType = string>(itemEntry: ItemEntry<ItemTypeType>, matchFunction: (itemType: ItemTypeType, parsedQuery: CollectionQuery) => boolean | 'maybe'): this;
|
|
35
|
+
}
|
|
@@ -32,8 +32,6 @@ export declare abstract class ItemHandlerBase {
|
|
|
32
32
|
/**
|
|
33
33
|
* @description
|
|
34
34
|
* Fetches the ItemEntries for the given query, does not look in the cache, since we don't know which ItemIds belong to the query !
|
|
35
|
-
*
|
|
36
|
-
* todo: We could store collections by their query string, and then see if the query is already cached
|
|
37
35
|
*/
|
|
38
36
|
abstract fetchItemEntriesByQuery<ItemTypeType extends ItemType>(itemType: ItemTypeType, query: ApiQuery, entryOptions: ItemEntryOptions): PromiseInterface<Array<ItemEntry<ItemTypeType>>>;
|
|
39
37
|
/**
|
|
@@ -50,7 +48,7 @@ export declare abstract class ItemHandlerBase {
|
|
|
50
48
|
* @description
|
|
51
49
|
* Processes the passed {@link ChangesDeltaItemUpdateDelta update delta} on the transaction, if there are no {@link TransactionItemHandler.itemChanges itemChanges} the new values will not be processed
|
|
52
50
|
*/
|
|
53
|
-
abstract processItemEntryChanges(itemEntryChangesTuple: ChangesDeltaItemUpdateDelta
|
|
51
|
+
abstract processItemEntryChanges<ItemTypeType extends ItemType>(itemEntryChangesTuple: ChangesDeltaItemUpdateDelta<ItemTypeType>, forceOverwrite: boolean, updateInitial: boolean, isCalledAfterSocketUpdate: boolean, createItemChangesIfNoneExist: boolean): FieldMap<ItemTypeType> | null;
|
|
54
52
|
/**
|
|
55
53
|
* @description
|
|
56
54
|
* Traverses the column path and returns the fields of the derived item, returns undefined if the item isn't found
|
|
@@ -85,11 +83,11 @@ export declare abstract class ItemHandlerBase {
|
|
|
85
83
|
* @description
|
|
86
84
|
* Creates a new {@link ItemEntry ItemEntry} from the passed {@link ChangesDeltaItemCreateDelta ChangesDeltaItemCreateDelta} and stores it in this transaction's {@link ItemCache ItemCache}
|
|
87
85
|
*/
|
|
88
|
-
|
|
86
|
+
createItemEntry(createTuple: ChangesDeltaItemCreateDelta): ItemEntry;
|
|
89
87
|
/**
|
|
90
88
|
* @description
|
|
91
89
|
* Gets the value of the given column, will look into the current delta before attempting to read itemChanges
|
|
92
90
|
*/
|
|
93
91
|
protected getItemIdByColumn<ItemTypeType extends ItemType>(itemEntry: ItemEntry<ItemTypeType>, column: ColumnInfo<ItemTypeType>, changesDelta?: ChangesDeltaBase): ItemId;
|
|
94
|
-
protected
|
|
92
|
+
protected expandColumnsWithCachedQueryColumns(itemType: ItemType, requestColumns?: ApiRequestColumns): ApiRequestColumns;
|
|
95
93
|
}
|