SYMBOL INDEX (360 symbols across 45 files) FILE: serverless/aliyun-fc/index.js function initServer (line 14) | async function initServer() { FILE: serverless/aws-lambda/index.js function initServer (line 14) | async function initServer() { FILE: serverless/tencent-scf/index.js function initServer (line 14) | async function initServer() { FILE: serverless/vercel/api/index.js function initServer (line 14) | async function initServer() { FILE: src/adapters/clickhouse.ts class ClickHouseAdapter (line 18) | class ClickHouseAdapter implements DbAdapter { method constructor (line 28) | constructor(config: { method connect (line 41) | async connect(): Promise { method disconnect (line 62) | async disconnect(): Promise { method executeQuery (line 72) | async executeQuery(query: string, params?: unknown[]): Promise { method getSchema (line 123) | async getSchema(): Promise { method getTableInfo (line 180) | private async getTableInfo(tableName: string): Promise { method isWriteOperation (line 313) | isWriteOperation(query: string): boolean { FILE: src/adapters/dm.ts function loadDMDB (line 27) | async function loadDMDB() { class DMAdapter (line 46) | class DMAdapter implements DbAdapter { method constructor (line 58) | constructor(config: { method isConnectionError (line 68) | private isConnectionError(error: unknown): boolean { method reconnect (line 73) | private async reconnect(): Promise { method startHeartbeat (line 84) | private startHeartbeat(): void { method stopHeartbeat (line 95) | private stopHeartbeat(): void { method withRetry (line 99) | private async withRetry(fn: () => Promise): Promise { method connect (line 109) | async connect(): Promise { method disconnect (line 149) | async disconnect(): Promise { method executeQuery (line 164) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 255) | private async _getSchemaImpl(): Promise { method getValueByIndex (line 388) | private getValueByIndex(obj: any, index: number): unknown { method makeTableKey (line 405) | private makeTableKey(owner: string, tableName: string, currentUser: st... method assembleSchemaFromIndexedRows (line 412) | private assembleSchemaFromIndexedRows( method formatDMType (line 696) | private formatDMType( method isWriteOperation (line 770) | isWriteOperation(query: string): boolean { FILE: src/adapters/gaussdb.ts class GaussDBAdapter (line 25) | class GaussDBAdapter implements DbAdapter { method constructor (line 35) | constructor(config: { method isConnectionError (line 45) | private isConnectionError(error: unknown): boolean { method withRetry (line 51) | private async withRetry(fn: () => Promise): Promise { method connect (line 65) | async connect(): Promise { method disconnect (line 91) | async disconnect(): Promise { method executeQuery (line 101) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 151) | private async _getSchemaImpl(): Promise { method makeTableKey (line 287) | private makeTableKey(schemaName: string, tableName: string): string { method assembleSchema (line 294) | private assembleSchema( method isWriteOperation (line 481) | isWriteOperation(query: string): boolean { FILE: src/adapters/goldendb.ts class GoldenDBAdapter (line 23) | class GoldenDBAdapter implements DbAdapter { method constructor (line 33) | constructor(config: { method isConnectionError (line 46) | private isConnectionError(error: unknown): boolean { method withRetry (line 54) | private async withRetry(fn: () => Promise): Promise { method connect (line 68) | async connect(): Promise { method disconnect (line 97) | async disconnect(): Promise { method executeQuery (line 107) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 167) | private async _getSchemaImpl(): Promise { method assembleSchema (line 250) | private assembleSchema( method isWriteOperation (line 416) | isWriteOperation(query: string): boolean { FILE: src/adapters/highgo.ts class HighGoAdapter (line 25) | class HighGoAdapter implements DbAdapter { method constructor (line 35) | constructor(config: { method isConnectionError (line 48) | private isConnectionError(error: unknown): boolean { method withRetry (line 60) | private async withRetry(fn: () => Promise, retries = 2): Promise... method connect (line 78) | async connect(): Promise { method disconnect (line 104) | async disconnect(): Promise { method executeQuery (line 114) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 164) | private async _getSchemaImpl(): Promise { method makeTableKey (line 299) | private makeTableKey(schemaName: string, tableName: string): string { method assembleSchema (line 306) | private assembleSchema( method isWriteOperation (line 495) | isWriteOperation(query: string): boolean { FILE: src/adapters/kingbase.ts class KingbaseAdapter (line 25) | class KingbaseAdapter implements DbAdapter { method constructor (line 35) | constructor(config: { method isConnectionError (line 48) | private isConnectionError(error: unknown): boolean { method withRetry (line 57) | private async withRetry(fn: () => Promise): Promise { method connect (line 71) | async connect(): Promise { method disconnect (line 97) | async disconnect(): Promise { method executeQuery (line 107) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 157) | private async _getSchemaImpl(): Promise { method makeTableKey (line 292) | private makeTableKey(schemaName: string, tableName: string): string { method assembleSchema (line 299) | private assembleSchema( method isWriteOperation (line 488) | isWriteOperation(query: string): boolean { FILE: src/adapters/mongodb.ts class MongoDBAdapter (line 18) | class MongoDBAdapter implements DbAdapter { method constructor (line 30) | constructor(config: { method connect (line 44) | async connect(): Promise { method disconnect (line 88) | async disconnect(): Promise { method executeQuery (line 107) | async executeQuery(query: string, _params?: unknown[]): Promise { method getMongoType (line 439) | private getMongoType(value: unknown): string { method isWriteOperation (line 456) | isWriteOperation(query: string): boolean { method isWriteOperationName (line 481) | private isWriteOperationName(operation: string): boolean { FILE: src/adapters/mysql.ts class MySQLAdapter (line 22) | class MySQLAdapter implements DbAdapter { method constructor (line 32) | constructor(config: { method isConnectionError (line 45) | private isConnectionError(error: unknown): boolean { method withRetry (line 53) | private async withRetry(fn: () => Promise): Promise { method connect (line 67) | async connect(): Promise { method disconnect (line 98) | async disconnect(): Promise { method executeQuery (line 108) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 171) | private async _getSchemaImpl(): Promise { method assembleSchema (line 254) | private assembleSchema( method isWriteOperation (line 426) | isWriteOperation(query: string): boolean { FILE: src/adapters/oceanbase.ts class OceanBaseAdapter (line 23) | class OceanBaseAdapter implements DbAdapter { method constructor (line 33) | constructor(config: { method isConnectionError (line 46) | private isConnectionError(error: unknown): boolean { method withRetry (line 54) | private async withRetry(fn: () => Promise): Promise { method connect (line 68) | async connect(): Promise { method disconnect (line 97) | async disconnect(): Promise { method executeQuery (line 107) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 167) | private async _getSchemaImpl(): Promise { method assembleSchema (line 250) | private assembleSchema( method isWriteOperation (line 416) | isWriteOperation(query: string): boolean { FILE: src/adapters/oracle.ts class OracleAdapter (line 22) | class OracleAdapter implements DbAdapter { method constructor (line 37) | constructor(config: { method isConnectionError (line 71) | private isConnectionError(error: unknown): boolean { method withRetry (line 78) | private async withRetry(fn: () => Promise): Promise { method withConnection (line 82) | private async withConnection(fn: (conn: oracledb.Connection) => Pro... method buildConnectionString (line 90) | private buildConnectionString(): string { method connect (line 111) | async connect(): Promise { method disconnect (line 137) | async disconnect(): Promise { method executeQuery (line 147) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 189) | private async _getSchemaImpl(): Promise { method makeTableKey (line 328) | private makeTableKey(owner: string, tableName: string, currentUser: st... method assembleSchema (line 335) | private assembleSchema( method formatOracleType (line 597) | private formatOracleType( method isWriteOperation (line 639) | isWriteOperation(query: string): boolean { FILE: src/adapters/polardb.ts class PolarDBAdapter (line 23) | class PolarDBAdapter implements DbAdapter { method constructor (line 33) | constructor(config: { method isConnectionError (line 46) | private isConnectionError(error: unknown): boolean { method withRetry (line 54) | private async withRetry(fn: () => Promise): Promise { method connect (line 68) | async connect(): Promise { method disconnect (line 97) | async disconnect(): Promise { method executeQuery (line 107) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 167) | private async _getSchemaImpl(): Promise { method assembleSchema (line 250) | private assembleSchema( method isWriteOperation (line 416) | isWriteOperation(query: string): boolean { FILE: src/adapters/postgres.ts class PostgreSQLAdapter (line 24) | class PostgreSQLAdapter implements DbAdapter { method constructor (line 34) | constructor(config: { method isConnectionError (line 47) | private isConnectionError(error: unknown): boolean { method withRetry (line 56) | private async withRetry(fn: () => Promise): Promise { method connect (line 70) | async connect(): Promise { method disconnect (line 98) | async disconnect(): Promise { method executeQuery (line 108) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 161) | private async _getSchemaImpl(): Promise { method makeTableKey (line 298) | private makeTableKey(schemaName: string, tableName: string): string { method assembleSchema (line 305) | private assembleSchema( method isWriteOperation (line 493) | isWriteOperation(query: string): boolean { FILE: src/adapters/redis.ts class RedisAdapter (line 18) | class RedisAdapter implements DbAdapter { method constructor (line 27) | constructor(config: { method connect (line 39) | async connect(): Promise { method disconnect (line 66) | async disconnect(): Promise { method executeQuery (line 82) | async executeQuery(query: string, params?: unknown[]): Promise { method isWriteOperation (line 260) | isWriteOperation(query: string): boolean { FILE: src/adapters/sqlite.ts class SQLiteAdapter (line 19) | class SQLiteAdapter implements DbAdapter { method constructor (line 26) | constructor(config: { method connect (line 36) | async connect(): Promise { method disconnect (line 55) | async disconnect(): Promise { method executeQuery (line 65) | async executeQuery(query: string, params?: unknown[]): Promise { method getTableInfo (line 174) | private async getTableInfo(tableName: string): Promise<{ tableInfo: Ta... method isWriteOperation (line 303) | isWriteOperation(query: string): boolean { FILE: src/adapters/sqlserver.ts class SQLServerAdapter (line 22) | class SQLServerAdapter implements DbAdapter { method constructor (line 32) | constructor(config: { method connect (line 45) | async connect(): Promise { method disconnect (line 91) | async disconnect(): Promise { method executeQuery (line 105) | async executeQuery(query: string, params?: unknown[]): Promise { method makeTableKey (line 301) | private makeTableKey(schemaName: string, tableName: string): string { method assembleSchema (line 308) | private assembleSchema( method formatSQLServerType (line 494) | private formatSQLServerType( method isWriteOperation (line 539) | isWriteOperation(query: string): boolean { FILE: src/adapters/tidb.ts class TiDBAdapter (line 23) | class TiDBAdapter implements DbAdapter { method constructor (line 33) | constructor(config: { method isConnectionError (line 46) | private isConnectionError(error: unknown): boolean { method withRetry (line 54) | private async withRetry(fn: () => Promise): Promise { method connect (line 68) | async connect(): Promise { method disconnect (line 97) | async disconnect(): Promise { method executeQuery (line 107) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 167) | private async _getSchemaImpl(): Promise { method assembleSchema (line 250) | private assembleSchema( method isWriteOperation (line 421) | isWriteOperation(query: string): boolean { FILE: src/adapters/vastbase.ts class VastbaseAdapter (line 25) | class VastbaseAdapter implements DbAdapter { method constructor (line 35) | constructor(config: { method isConnectionError (line 48) | private isConnectionError(error: unknown): boolean { method withRetry (line 60) | private async withRetry(fn: () => Promise, retries = 2): Promise... method connect (line 78) | async connect(): Promise { method disconnect (line 104) | async disconnect(): Promise { method executeQuery (line 114) | async executeQuery(query: string, params?: unknown[]): Promise { method _getSchemaImpl (line 158) | private async _getSchemaImpl(): Promise { method makeTableKey (line 299) | private makeTableKey(schemaName: string, tableName: string): string { method assembleSchema (line 306) | private assembleSchema( method isWriteOperation (line 495) | isWriteOperation(query: string): boolean { FILE: src/core/connection-manager.ts type ExtendedSession (line 16) | interface ExtendedSession extends Session { class ConnectionManager (line 24) | class ConnectionManager { method constructor (line 30) | constructor( method connect (line 49) | async connect(config: DbConfig): Promise { method disconnect (line 80) | async disconnect(sessionId: string): Promise { method getAdapter (line 100) | getAdapter(sessionId: string): DbAdapter { method getService (line 117) | getService(sessionId: string): DatabaseService { method hasSession (line 134) | hasSession(sessionId: string): boolean { method getSessionCount (line 141) | getSessionCount(): number { method getSessionIds (line 148) | getSessionIds(): string[] { method clearSessionCache (line 155) | clearSessionCache(sessionId: string): void { method clearAllCaches (line 165) | clearAllCaches(): void { method cleanupExpiredSessions (line 175) | private cleanupExpiredSessions(): void { method disconnectAll (line 198) | async disconnectAll(): Promise { FILE: src/core/database-service.ts type SchemaCacheConfig (line 15) | interface SchemaCacheConfig { type SchemaCacheStats (line 30) | interface SchemaCacheStats { constant DEFAULT_CACHE_CONFIG (line 46) | const DEFAULT_CACHE_CONFIG: SchemaCacheConfig = { class DatabaseService (line 55) | class DatabaseService { method constructor (line 72) | constructor( method executeQuery (line 88) | async executeQuery(query: string, params?: unknown[]): Promise { method enhanceSchema (line 150) | private enhanceSchema(schema: SchemaInfo): SchemaInfo { method getTableInfo (line 174) | async getTableInfo(tableName: string, forceRefresh: boolean = false): ... method listTables (line 218) | async listTables(forceRefresh: boolean = false): Promise { method testConnection (line 226) | async testConnection(): Promise { method clearSchemaCache (line 239) | clearSchemaCache(): void { method getCacheStats (line 248) | getCacheStats(): SchemaCacheStats { method getCacheHitRate (line 264) | getCacheHitRate(): string { method updateCacheConfig (line 273) | updateCacheConfig(config: Partial): void { method updateEnhancerConfig (line 281) | updateEnhancerConfig(config: Partial): void { method getEnhancerConfig (line 291) | getEnhancerConfig(): SchemaEnhancerConfig { method validateQuery (line 298) | private validateQuery(query: string): void { method getAdapter (line 305) | getAdapter(): DbAdapter { method getConfig (line 312) | getConfig(): DbConfig { method getEnumValues (line 326) | async getEnumValues( method getSampleData (line 400) | async getSampleData( method buildEnumValuesQuery (line 463) | private buildEnumValuesQuery(tableName: string, columnName: string, li... method buildEnumValuesQueryWithCount (line 475) | private buildEnumValuesQueryWithCount(tableName: string, columnName: s... method buildSampleDataQuery (line 487) | private buildSampleDataQuery(tableName: string, columns: string[], lim... method quoteIdentifier (line 501) | private quoteIdentifier(identifier: string): string { method quoteSimpleIdentifier (line 516) | private quoteSimpleIdentifier(identifier: string): string { method appendLimit (line 542) | private appendLimit(query: string, limit: number): string { FILE: src/http/http-index.ts function startHttpServer (line 12) | async function startHttpServer(config: AppConfig): Promise { FILE: src/http/middleware/auth.ts function authMiddleware (line 12) | async function authMiddleware( FILE: src/http/middleware/error-handler.ts function setupErrorHandler (line 11) | function setupErrorHandler(fastify: any): void { FILE: src/http/routes/connection.ts function setupConnectionRoutes (line 16) | async function setupConnectionRoutes( FILE: src/http/routes/health.ts function setupHealthRoutes (line 9) | async function setupHealthRoutes(fastify: FastifyInstance): Promise { FILE: src/http/routes/index.ts function setupRoutes (line 17) | async function setupRoutes( FILE: src/http/routes/mcp-sse.ts type DbType (line 17) | type DbType = DbConfig['type']; constant SUPPORTED_DB_TYPES (line 18) | const SUPPORTED_DB_TYPES: DbType[] = [ function isValidDbType (line 35) | function isValidDbType(type: string): type is DbType { function parseDbConfigFromQuery (line 42) | function parseDbConfigFromQuery(query: Record): DbConfi... function createMcpServer (line 70) | async function createMcpServer(config: DbConfig): Promise { function setupMcpSseRoutes (line 94) | async function setupMcpSseRoutes(fastify: FastifyInstance): Promise { FILE: src/http/routes/query.ts function setupQueryRoutes (line 11) | async function setupQueryRoutes( FILE: src/http/routes/schema.ts type SchemaWithCacheInfo (line 15) | interface SchemaWithCacheInfo extends SchemaInfo { type CacheStatusResponse (line 26) | interface CacheStatusResponse { function setupSchemaRoutes (line 32) | async function setupSchemaRoutes( FILE: src/http/server.ts function createHttpServer (line 17) | async function createHttpServer(config: AppConfig) { FILE: src/index.ts function main (line 10) | async function main() { FILE: src/mcp/mcp-index.ts function startMcpServer (line 16) | async function startMcpServer(): Promise { FILE: src/mcp/mcp-server.ts class DatabaseMCPServer (line 22) | class DatabaseMCPServer { method constructor (line 29) | constructor(config?: DbConfig, cacheConfig?: Partial { method connect (line 579) | async connect(transport: Transport): Promise { method start (line 586) | async start(): Promise { method stop (line 604) | async stop(): Promise { FILE: src/test.ts function testMySQL (line 14) | async function testMySQL() { function testPostgreSQL (line 58) | async function testPostgreSQL() { function testRedis (line 92) | async function testRedis() { function testOracle (line 127) | async function testOracle() { function testDM (line 172) | async function testDM() { function main (line 218) | async function main() { FILE: src/types/adapter.ts type DbAdapter (line 6) | interface DbAdapter { type QueryResult (line 43) | interface QueryResult { type SchemaInfo (line 57) | interface SchemaInfo { type TableInfo (line 73) | interface TableInfo { type ColumnInfo (line 95) | interface ColumnInfo { type IndexInfo (line 111) | interface IndexInfo { type ForeignKeyInfo (line 123) | interface ForeignKeyInfo { type RelationshipInfo (line 141) | interface RelationshipInfo { type PermissionType (line 163) | type PermissionType = 'read' | 'insert' | 'update' | 'delete' | 'ddl'; type PermissionMode (line 168) | type PermissionMode = 'safe' | 'readwrite' | 'full' | 'custom'; type DbConfig (line 173) | interface DbConfig { type EnumValuesResult (line 196) | interface EnumValuesResult { type SampleDataResult (line 217) | interface SampleDataResult { FILE: src/types/http.ts type HttpConfig (line 11) | interface HttpConfig { type CorsConfig (line 24) | interface CorsConfig { type RateLimitConfig (line 32) | interface RateLimitConfig { type LoggingConfig (line 40) | interface LoggingConfig { type SessionConfig (line 48) | interface SessionConfig { type AppConfig (line 56) | interface AppConfig { type ConnectRequest (line 65) | interface ConnectRequest { type ConnectResponse (line 82) | interface ConnectResponse { type DisconnectRequest (line 91) | interface DisconnectRequest { type DisconnectResponse (line 98) | interface DisconnectResponse { type QueryRequest (line 105) | interface QueryRequest { type ExecuteRequest (line 114) | interface ExecuteRequest { type TablesRequest (line 123) | interface TablesRequest { type TablesResponse (line 130) | interface TablesResponse { type SchemaRequest (line 137) | interface SchemaRequest { type ApiError (line 145) | interface ApiError { type ResponseMetadata (line 154) | interface ResponseMetadata { type ApiResponse (line 163) | interface ApiResponse { type HealthResponse (line 173) | interface HealthResponse { type InfoResponse (line 182) | interface InfoResponse { type Session (line 192) | interface Session { type HttpQueryResult (line 203) | interface HttpQueryResult { type AuthenticatedRequest (line 217) | interface AuthenticatedRequest { FILE: src/utils/adapter-factory.ts type DbType (line 28) | type DbType = function normalizeDbType (line 50) | function normalizeDbType(type: string): DbType { function validateDbConfig (line 94) | function validateDbConfig(config: DbConfig): void { function createAdapter (line 115) | function createAdapter(config: DbConfig): DbAdapter { FILE: src/utils/config-loader.ts constant DEFAULT_HTTP_CONFIG (line 16) | const DEFAULT_HTTP_CONFIG: HttpConfig = { function loadFromEnv (line 41) | function loadFromEnv(): Partial { function mergeConfigs (line 95) | function mergeConfigs(...configs: Partial[]): AppConfig { function loadConfig (line 123) | function loadConfig(): AppConfig { function validateConfig (line 142) | function validateConfig(config: AppConfig): void { FILE: src/utils/data-masking.ts type MaskType (line 18) | type MaskType = 'phone' | 'email' | 'idcard' | 'bankcard' | 'password' |... type MaskingRule (line 23) | interface MaskingRule { constant DEFAULT_MASKING_RULES (line 33) | const DEFAULT_MASKING_RULES: MaskingRule[] = [ class DataMasker (line 59) | class DataMasker { method constructor (line 63) | constructor(enabled: boolean = true, customRules?: MaskingRule[]) { method maskValue (line 76) | maskValue(columnName: string, value: unknown): unknown { method maskRow (line 111) | maskRow(row: Record): { method maskRows (line 135) | maskRows(rows: Record[]): { method findMatchingRule (line 157) | private findMatchingRule(columnName: string): MaskingRule | undefined { method autoDetectAndMask (line 166) | private autoDetectAndMask(value: string): string { method applyMask (line 196) | private applyMask(value: string, type: MaskType): string { method isEnabled (line 250) | isEnabled(): boolean { method setEnabled (line 257) | setEnabled(enabled: boolean): void { method addRule (line 265) | addRule(rule: MaskingRule): void { function createDataMasker (line 276) | function createDataMasker(enabled: boolean = true): DataMasker { FILE: src/utils/safety.ts constant OPERATION_KEYWORDS (line 11) | const OPERATION_KEYWORDS: Record, readon... constant PERMISSION_PRESETS (line 21) | const PERMISSION_PRESETS: Record = { function resolvePermissions (line 30) | function resolvePermissions(config: DbConfig): PermissionType[] { function startsWithKeyword (line 54) | function startsWithKeyword(query: string, keyword: string): boolean { function isWriteOperation (line 64) | function isWriteOperation(query: string): boolean { function detectOperationType (line 79) | function detectOperationType(query: string): { type: Exclude) { method enhanceRelationships (line 46) | enhanceRelationships( method inferRelationships (line 79) | private inferRelationships( method tryInferRelation (line 132) | private tryInferRelation( method findTargetTable (line 175) | private findTargetTable( method refineRelationshipTypes (line 228) | private refineRelationshipTypes( method hasUniqueConstraint (line 254) | private hasUniqueConstraint(table: TableInfo, columns: string[]): bool... method updateConfig (line 280) | updateConfig(config: Partial): void { method getConfig (line 287) | getConfig(): SchemaEnhancerConfig { function createSchemaEnhancer (line 295) | function createSchemaEnhancer(config?: Partial): S... FILE: tests/unit/connection-stability.test.ts function createWithRetry (line 69) | function createWithRetry(isConnectionError: (e: unknown) => boolean) { function isOracleConnectionError (line 194) | function isOracleConnectionError(error: { message?: string; errorNum?: n...