perspectives - remove mongo hardcodes

This commit is contained in:
Jan Prochazka
2024-08-20 10:28:02 +02:00
parent 30e3bc6eeb
commit 80a4d3f238
10 changed files with 133 additions and 149 deletions

View File

@@ -41,6 +41,8 @@ export interface ReadCollectionOptions {
countDocuments?: boolean;
skip?: number;
limit?: number;
condition?: any;
aggregate?: CollectionAggregateDefinition;
}
export interface NewObjectTemplate {
@@ -72,6 +74,17 @@ export interface ServerSummary {
databases: ServerSummaryDatabase[];
}
export type CollectionAggregateFunction = 'count' | 'sum' | 'avg' | 'min' | 'max';
export interface CollectionAggregateDefinition {
condition: any; // SQL tree condition
groupByColumns: string[];
aggregateColumns: {
alias: string;
aggregateFunction: CollectionAggregateFunction;
columnArgument?: string;
}[];
}
export interface FilterBehaviourProvider {
getFilterBehaviour(dataType: string, standardFilterBehaviours: { [id: string]: FilterBehaviour }): FilterBehaviour;
}