import { Database, Dialect } from '../base/index.js'; import { BuildQueryResult, DatabaseDialect, DocumentQueryResult, QueryParams } from "../types.js"; import { DocumentDatabase } from "../type/document/database.js"; import type { MongoClientOptions } from 'mongodb'; export interface MongoDBDialectConfig extends MongoClientOptions { url: string; dbName: string; } export declare class MongoDBDialect = Record> extends Dialect { private client; private db; constructor(config: MongoDBDialectConfig); /** * 检查是否已连接 */ isConnected(): boolean; /** * 连接数据库 */ connect(): Promise; /** * 断开连接 */ disconnect(): Promise; /** * 健康检查 */ healthCheck(): Promise; /** * 启动连接 */ start(): Promise; /** * 停止连接 */ stop(): Promise; /** * 释放资源 */ dispose(): Promise; /** * 执行查询 */ query(query: DocumentQueryResult, params?: any[]): Promise; /** * 构建查询 */ buildQuery(params: QueryParams): BuildQueryResult; mapColumnType(type: string): string; formatBoolean(value: boolean): string; formatDate(value: Date): string; formatJson(value: any): string; escapeString(value: string): string; formatDefaultValue(value: any): string; formatLimit(limit: number): string; formatOffset(offset: number): string; formatLimitOffset(limit: number, offset: number): string; formatCreateTable(tableName: keyof S, columns: string[]): string; formatAlterTable(tableName: keyof S, alterations: string[]): string; formatDropTable(tableName: keyof S, ifExists?: boolean): string; formatDropIndex(indexName: string, tableName: keyof S, ifExists?: boolean): string; quoteIdentifier(identifier: string): string; getParameterPlaceholder(index: number): string; getStatementTerminator(): string; private buildCreateQuery; private buildSelectQuery; private buildInsertQuery; private buildUpdateQuery; private buildDeleteQuery; private buildAlterQuery; private buildDropTableQuery; private buildDropIndexQuery; private convertConditionToMongoFilter; private executeFind; private executeInsertOne; private executeInsertMany; private executeUpdateOne; private executeUpdateMany; private executeDeleteOne; private executeDeleteMany; private executeCreateIndex; private executeDropIndex; private executeDropCollection; get dialectInfo(): DatabaseDialect; } export declare class MongoDB = Record> extends DocumentDatabase { constructor(config: MongoDBDialectConfig, definitions?: Database.DefinitionObj); } //# sourceMappingURL=mongodb.d.ts.map