import { OnModuleDestroy, OnModuleInit } from "@nestjs/common"; import { ConfigService } from "@nestjs/config"; import { Driver } from "neo4j-driver"; import { ClsService } from "nestjs-cls"; import { DataModelInterface } from "../../../common/interfaces/datamodel.interface"; import { JsonApiCursorInterface } from "../../jsonapi/interfaces/jsonapi.cursor.interface"; import { AppLoggingService } from "../../logging/services/logging.service"; import { EntityFactory } from "../factories/entity.factory"; export type QueryType = { query: string; queryParams?: any; cursor?: JsonApiCursorInterface; serialiser?: DataModelInterface; fetchAll?: boolean; }; export declare class Neo4jService implements OnModuleInit, OnModuleDestroy { private readonly entityFactory; private readonly cls; private readonly logger; private driver; private _database?; private activeConnections; private readonly maxRetries; private readonly retryDelay; private readonly neo4jConfig; private readonly computePaginationTotal; constructor(entityFactory: EntityFactory, cls: ClsService, logger: AppLoggingService, configService: ConfigService); initQuery(params?: { cursor?: JsonApiCursorInterface; serialiser?: DataModelInterface; fetchAll?: boolean; }): QueryType; getConfig(params: { indexName: string; nodeLabel: string; textNodeProperty: string; }): any; getDriver(): Driver; readOne(params: QueryType): Promise; readManyWithoutCount(params: QueryType): Promise; readMany(params: QueryType): Promise; /** * Build a count query from a data query by: * 1. Taking everything before {CURSOR} * 2. Removing ORDER BY clause * 3. Adding RETURN count(DISTINCT nodeName) AS total */ private buildCountQuery; writeOne(params: QueryType): Promise; writeAndReturnMany(params: QueryType): Promise; readCount(query: string, params?: any): Promise; read(query: string, params?: any): Promise; validateExistingNodes(params: { nodes: { id: string; label: string; }[]; }): Promise; private withRetry; private write; getActiveConnections(): number; cleanup(): Promise; executeInTransaction(queries: { query: string; params?: any; }[]): Promise; onModuleInit(): Promise; onModuleDestroy(): Promise; } //# sourceMappingURL=neo4j.service.d.ts.map