MCPcopy Create free account

hub / github.com/bytebase/dbhub / functions

Functions717 in github.com/bytebase/dbhub

↓ 4 callersFunctionscanMultiLineComment
(sql: string, i: number)
src/utils/sql-parser.ts:45
↓ 4 callersFunctionscanSingleLineComment
(sql: string, i: number)
src/utils/sql-parser.ts:15
↓ 4 callersMethodtableExists
* Check if a table exists * @param tableName The name of the table to check * @param schema Optional schema name. If not provided, implementatio
src/connectors/interface.ts:210
↓ 4 callersFunctiontrackToolRequest
( metadata: RequestMetadata, startTime: number, extra: any, success: boolean, error?: string )
src/utils/tool-handler-helpers.ts:61
↓ 4 callersFunctionuseSidebar
()
frontend/src/components/ui/sidebar.tsx:47
↓ 3 callersMethodconnectSource
* Connect to a single source (helper for connectWithSources)
src/connectors/manager.ts:143
↓ 3 callersFunctioncreateMockConnector
(id: ConnectorType = 'sqlite', sourceId: string = 'default')
src/tools/__tests__/execute-sql.test.ts:12
↓ 3 callersFunctioncreateServer
()
src/server.ts:118
↓ 3 callersMethodensureConnected
* Ensure a source is connected (handles lazy connection on demand) * Safe to call multiple times - uses promise-based deduplication so concurrent c
src/connectors/manager.ts:87
↓ 3 callersFunctionfail
()
src/config/env.ts:354
↓ 3 callersFunctionfetchSources
()
frontend/src/api/sources.ts:16
↓ 3 callersFunctiongenerateRdsAuthToken
(params: RdsAuthTokenParams)
src/utils/aws-rds-signer.ts:15
↓ 3 callersMethodgetAvailableSourceIds
Get all available source IDs
src/connectors/manager.ts:393
↓ 3 callersMethodgetCurrentConnector
* Get the current active connector instance * This is used by resource and tool handlers * @param sourceId - Optional source ID. If not provided
src/connectors/manager.ts:377
↓ 3 callersMethodgetEnabledToolConfigs
* Get all enabled tool configs for a specific source
src/tools/registry.ts:204
↓ 3 callersMethodgetIsConnected
* Check if tunnel is connected
src/utils/ssh-tunnel.ts:373
↓ 3 callersMethodgetSearchParam
(name: string)
src/utils/safe-url.ts:21
↓ 3 callersMethodgetTableIndexes
* Get indexes for a specific table * @param tableName The name of the table to get indexes for * @param schema Optional schema name. If not prov
src/connectors/interface.ts:219
↓ 3 callersFunctiongetToolsForSource
(sourceId: string)
src/utils/tool-metadata.ts:306
↓ 3 callersMethodgetTotal
* Get total count of requests across all sources
src/requests/store.ts:56
↓ 3 callersMethodgetViews
* Get all views in the database or in a specific schema * @param schema Optional schema name. If not provided, implementation should use the defaul
src/connectors/interface.ts:192
↓ 3 callersFunctioninterpolateEnvVars
(value: unknown)
src/config/toml-loader.ts:721
↓ 3 callersFunctionisDemoMode
()
src/config/env.ts:147
↓ 3 callersFunctionisFile
* Check if a path points to an existing file. * * This function uses {@link statSync} and will follow symlinks. It does not * require the path to b
src/utils/ssh-config-parser.ts:65
↓ 3 callersFunctionisMetadataObject
* Checks if an element is a metadata object from INSERT/UPDATE/DELETE operations * rather than a row array from SELECT queries. * * Different drive
src/utils/multi-statement-result-parser.ts:17
↓ 3 callersFunctionloadFixtureConfig
(fixtureName: string)
src/__fixtures__/helpers.ts:48
↓ 3 callersFunctionnormalizeHost
* Normalize a host entry (from config or a bind address) to the canonical, * lower-cased, port-stripped hostname that `new URL().hostname` yields, so
src/utils/cross-origin.ts:57
↓ 3 callersFunctionsetupManagerWithFixture
(fixtureName: string)
src/__fixtures__/helpers.ts:94
↓ 3 callersFunctiontryClassifyConnectionError
( error: unknown, rawSourceId: string | undefined, displaySourceId: string )
src/utils/tool-handler-helpers.ts:89
↓ 2 callersMethodbuildConnectionDSN
* Build a connection DSN, optionally replacing password with * an AWS RDS IAM auth token when aws_iam_auth is enabled.
src/connectors/manager.ts:518
↓ 2 callersMethodconnect
(dsn: string, initScript?: string, config?: ConnectorConfig)
src/connectors/postgres/index.ts:168
↓ 2 callersMethodconnect
(dsn: string, initScript?: string, config?: ConnectorConfig)
src/connectors/mariadb/index.ts:132
↓ 2 callersMethodconnect
(dsn: string, initScript?: string, config?: ConnectorConfig)
src/connectors/mysql/index.ts:141
↓ 2 callersMethodconnectToHost
* Connect to a single SSH host.
src/utils/ssh-tunnel.ts:171
↓ 2 callersMethodcreateConnector
()
src/connectors/__tests__/mysql.integration.test.ts:39
↓ 2 callersFunctioncreateCustomToolHandler
(toolConfig: ToolConfig)
src/tools/custom-tool-handler.ts:156
↓ 2 callersFunctioncreateMockConnector
(id: ConnectorType = 'sqlite')
src/tools/__tests__/search-objects.test.ts:10
↓ 2 callersMethoddisconnect
()
src/connectors/postgres/index.ts:203
↓ 2 callersMethoddisconnect
()
src/connectors/mariadb/index.ts:146
↓ 2 callersMethoddisconnect
()
src/connectors/mysql/index.ts:159
↓ 2 callersMethodexecuteSQL
(sql: string, options: ExecuteOptions, parameters?: any[])
src/connectors/postgres/index.ts:598
↓ 2 callersMethodexecuteSQL
(sql: string, options: ExecuteOptions, parameters?: any[])
src/connectors/mariadb/index.ts:593
↓ 2 callersMethodexecuteSQL
(sql: string, options: ExecuteOptions, parameters?: any[])
src/connectors/mysql/index.ts:606
↓ 2 callersFunctionexecuteTool
( toolName: string, args: Record<string, any> )
frontend/src/api/tools.ts:31
↓ 2 callersFunctionextractAffectedRows
(results: any)
src/utils/multi-statement-result-parser.ts:80
↓ 2 callersFunctionfetchSource
(sourceId: string)
frontend/src/api/sources.ts:38
↓ 2 callersFunctionformatErrorResponse
( error: string, code: string = "ERROR", details?: any )
src/utils/response-formatter.ts:45
↓ 2 callersFunctionformatHostDatabase
(host: string, database: string)
src/utils/startup-table.ts:86
↓ 2 callersFunctionformatSuccessResponse
( data: T, meta: Record<string, any> = {} )
src/utils/response-formatter.ts:27
↓ 2 callersMethodgetAllSourceConfigs
* Get all source configurations
src/connectors/manager.ts:415
↓ 2 callersMethodgetBuiltinToolConfig
* Get built-in tool configuration for a specific source * Returns undefined if tool is not enabled or not a built-in
src/tools/registry.ts:212
↓ 2 callersMethodgetDefaultPort
* Get default port for a database based on DSN protocol
src/connectors/manager.ts:442
↓ 2 callersFunctiongetDefaultSSHConfigPath
()
src/utils/ssh-config-parser.ts:14
↓ 2 callersFunctiongetEffectiveSourceId
(sourceId?: string)
src/utils/tool-handler-helpers.ts:28
↓ 2 callersMethodgetHost
()
src/connectors/__tests__/sqlserver.integration.test.ts:20
↓ 2 callersMethodgetMappedPort
(port: number)
src/connectors/__tests__/sqlserver.integration.test.ts:24
↓ 2 callersFunctiongetScanner
(dialect?: ConnectorType)
src/utils/sql-parser.ts:196
↓ 2 callersMethodgetSearchParam
* Helper method to safely get a parameter from query string * * @param name - The parameter name to retrieve * @returns The parameter value
src/utils/safe-url.ts:136
↓ 2 callersMethodgetSourceIds
* Get all available source IDs
src/connectors/manager.ts:388
↓ 2 callersMethodgetStoredProcedureDetail
* Get details for a specific stored procedure/function * @param procedureName The name of the procedure/function to get details for * @param sch
src/connectors/interface.ts:236
↓ 2 callersMethodgetStoredProcedures
* Get stored procedures/functions in the database or in a specific schema * @param schema Optional schema name. If not provided, implementation sho
src/connectors/interface.ts:228
↓ 2 callersFunctiongetTableRowCount
* Get row count estimate for a table. * Prefers the connector's native statistics-based method (e.g. pg_class.reltuples) * when available, falling b
src/tools/search-objects.ts:95
↓ 2 callersMethodgetTunnelInfo
* Get current tunnel information
src/utils/ssh-tunnel.ts:366
↓ 2 callersFunctionisMultiStatementResult
* Checks if results appear to be from a multi-statement query. * * Multi-statement results are arrays containing mixed types: * - Metadata objects
src/utils/multi-statement-result-parser.ts:36
↓ 2 callersMethodisSelectQuery
* Check if a SQL statement is a SELECT query that can benefit from row limiting * Only handles SELECT queries
src/utils/sql-row-limiter.ts:11
↓ 2 callersMethodloadPrivateKey
* Load an SSH private key, supporting both a file path (with symlink resolution) * and base64-encoded key content.
src/utils/ssh-tunnel.ts:64
↓ 2 callersFunctionloadSqlFile
(fileName: string)
src/config/demo-loader.ts:44
↓ 2 callersFunctionparseQueryResults
(results: any)
src/utils/multi-statement-result-parser.ts:117
↓ 2 callersFunctionredactDSN
(dsn: string)
src/config/env.ts:463
↓ 2 callersFunctionrequireFlagValue
* Resolve a string-valued flag (e.g. `--host`) that must carry a real value, * rejecting every value-less form with a single friendly error and exit(
src/config/env.ts:349
↓ 2 callersFunctionresolveTomlConfigPath
()
src/config/toml-loader.ts:59
↓ 2 callersFunctionscanBacktickQuotedIdentifier
(sql: string, i: number)
src/utils/sql-parser.ts:119
↓ 2 callersFunctionscanBracketQuotedIdentifier
(sql: string, i: number)
src/utils/sql-parser.ts:130
↓ 2 callersFunctionscheduleReload
()
src/utils/config-watcher.ts:38
↓ 2 callersFunctionscroll
(direction: 'left' | 'right')
frontend/src/components/tool/ResultsTabs.tsx:56
↓ 2 callersFunctionsearchProcedures
* Search for stored procedures and/or functions * @param routineType Optional filter: "procedure" for procedures only, "function" for functions only.
src/tools/search-objects.ts:471
↓ 2 callersFunctionsplitHostList
Split a comma-separated host list, trimming and dropping empty entries.
src/config/env.ts:450
↓ 2 callersFunctiontransformSourceConfig
* Transform a SourceConfig into an API DataSource response * Excludes sensitive fields like passwords and SSH credentials
src/api/sources.ts:16
↓ 2 callersFunctionvalidatePort
* Validate a port number and throw an error if invalid * @param port The port number to validate * @param jumpHostStr The original jump host string
src/utils/ssh-config-parser.ts:243
↓ 1 callersMethodapplyLimitToQuery
* Add or modify LIMIT clause in a SQL statement
src/utils/sql-row-limiter.ts:71
↓ 1 callersMethodapplyMaxRowsForSQLServer
* Apply maxRows limit to a SELECT query using SQL Server TOP syntax
src/utils/sql-row-limiter.ts:149
↓ 1 callersMethodapplyTopToQuery
* Add or modify TOP clause in a SQL statement (SQL Server)
src/utils/sql-row-limiter.ts:92
↓ 1 callersFunctionareAllStatementsReadOnly
* Check if all SQL statements in a multi-statement query are read-only * @param sql The SQL string (possibly containing multiple statements) * @para
src/tools/execute-sql.ts:26
↓ 1 callersFunctionauthMessage
(sourceId: string)
src/utils/error-classifier.ts:44
↓ 1 callersFunctionbuildCustomTool
* Build custom tool metadata for API response
src/utils/tool-metadata.ts:289
↓ 1 callersFunctionbuildExecuteSqlTool
* Build execute_sql tool metadata for API response
src/utils/tool-metadata.ts:217
↓ 1 callersMethodbuildRegistry
* Build the internal registry mapping sources to their enabled tools
src/tools/registry.ts:158
↓ 1 callersFunctionbuildSearchObjectsTool
* Build search_objects tool metadata for API response
src/utils/tool-metadata.ts:238
↓ 1 callersFunctionbuildSourceDisplayInfo
( sourceConfigs: SourceConfig[], getToolsForSource: (sourceId: string) => string[], isDemo: boolean )
src/utils/startup-table.ts:177
↓ 1 callersFunctioncheckReadOnly
(cleanedSQL: string, connectorType: ConnectorType | string)
src/utils/allowed-keywords.ts:111
↓ 1 callersFunctioncheckSymlinkSupport
* Check if symlinks are supported on the current platform. * On Windows without admin rights, symlink creation will fail with EPERM.
src/utils/__tests__/ssh-config-parser.test.ts:11
↓ 1 callersMethodclone
Create a new instance of this connector (for multi-source support). This method is required for all connectors.
src/connectors/interface.ts:145
↓ 1 callersMethodcreateContainer
()
src/connectors/__tests__/mysql.integration.test.ts:30
↓ 1 callersMethodcreateLocalTunnel
* Create the local server that tunnels connections to the database.
src/utils/ssh-tunnel.ts:253
↓ 1 callersFunctioncreateReadonlyViolationMessage
( toolName: string, sourceId: string, connectorType: ConnectorType )
src/utils/tool-handler-helpers.ts:45
↓ 1 callersMethodcreateSSLTests
()
src/connectors/__tests__/postgres.integration.test.ts:47
↓ 1 callersMethodcreateSSLTests
()
src/connectors/__tests__/mariadb.integration.test.ts:43
↓ 1 callersMethodcreateSSLTests
()
src/connectors/__tests__/mysql.integration.test.ts:43
↓ 1 callersFunctioncustomParamsToToolParams
* Convert custom tool parameter configs to Tool parameter format * @param params - Parameter configurations from custom tool * @returns Array of too
src/utils/tool-metadata.ts:201
↓ 1 callersMethodestablishChain
* Establish a chain of SSH connections through jump hosts. * @returns The final SSH client connected to the target host
src/utils/ssh-tunnel.ts:90
← previousnext →101–200 of 717, ranked by callers