MCPcopy Create free account

hub / github.com/bytebase/dbhub / functions

Functions717 in github.com/bytebase/dbhub

↓ 267 callersMethodexecuteSQL
Execute a SQL query with execution options and optional parameters
src/connectors/interface.ts:253
↓ 232 callersFunctioncn
(...inputs: ClassValue[])
frontend/src/lib/utils.ts:4
↓ 101 callersFunctionloadTomlConfig
()
src/config/toml-loader.ts:15
↓ 92 callersFunctionisReadOnlySQL
(sql: string, connectorType: ConnectorType | string)
src/utils/allowed-keywords.ts:104
↓ 76 callersFunctionstripCommentsAndStrings
(sql: string, dialect?: ConnectorType)
src/utils/sql-parser.ts:204
↓ 67 callersMethodadd
* Add a request to the store * Evicts oldest entry if at capacity
src/requests/store.ts:28
↓ 61 callersFunctionquoteIdentifier
(identifier: string, dbType: ConnectorType)
src/utils/identifier-quoter.ts:23
↓ 55 callersMethodparse
* Parse a connection string into connector-specific configuration * @param dsn - Database connection string * @param config - Optional database-
src/connectors/interface.ts:118
↓ 51 callersFunctionparseToolResponse
(response: any)
src/tools/__tests__/search-objects.test.ts:30
↓ 50 callersFunctionsplitSQLStatements
(sql: string, dialect?: ConnectorType)
src/utils/sql-parser.ts:237
↓ 49 callersFunctioncreateSearchDatabaseObjectsToolHandler
(sourceId?: string)
src/tools/search-objects.ts:619
↓ 42 callersMethodconnect
Connect to the database using DSN, with optional init script and database-specific configuration
src/connectors/interface.ts:148
↓ 39 callersFunctioncreateRequest
(overrides: Partial<Request> = {})
src/api/__tests__/requests.integration.test.ts:7
↓ 36 callersFunctionbuildDSNFromSource
(source: SourceConfig)
src/config/toml-loader.ts:831
↓ 32 callersMethoddisconnect
Close the connection
src/connectors/interface.ts:151
↓ 27 callersFunctionparseJumpHost
(jumpHostStr: string)
src/utils/ssh-config-parser.ts:261
↓ 26 callersFunctioncountParameters
(statement: string)
src/utils/parameter-mapper.ts:91
↓ 25 callersFunctionnormalizeSourceId
(id: string)
src/utils/normalize-id.ts:14
↓ 22 callersMethodapplyMaxRows
* Apply maxRows limit to a SELECT query only * * This method is used by PostgreSQL, MySQL, MariaDB, and SQLite connectors which all support *
src/utils/sql-row-limiter.ts:126
↓ 21 callersFunctionbuildDSNFromEnvParams
()
src/config/env.ts:157
↓ 21 callersFunctionvalidateOrigin
( originHeader: string | undefined, hostHeader: string | undefined, allowedHosts: Set<string> )
src/utils/cross-origin.ts:182
↓ 20 callersFunctionresolveHost
()
src/config/env.ts:395
↓ 19 callersFunctioncreateExecuteSqlToolHandler
(sourceId?: string)
src/tools/execute-sql.ts:36
↓ 18 callersMethodgetConnector
* Get a connector by source ID * If sourceId is not provided, returns the default (first) connector
src/connectors/manager.ts:341
↓ 17 callersFunctionbuildAllowedHosts
( configured: string[] = [], bindHost?: string, selfHosts: string[] = [] )
src/utils/cross-origin.ts:134
↓ 17 callersFunctionbuildSourceDescriptionPrefix
(description: string | undefined)
src/utils/tool-metadata.ts:63
↓ 16 callersFunctioncreateRequest
(overrides: Partial<Request> = {})
src/requests/__tests__/store.test.ts:4
↓ 16 callersFunctionparseSSHConfig
( hostAlias: string, configPath: string, options: { requireUser?: boolean } = {} )
src/utils/ssh-config-parser.ts:111
↓ 15 callersFunctionbuildZodSchemaFromParameters
( parameters: ParameterConfig[] | undefined )
src/tools/custom-tool-handler.ts:27
↓ 15 callersFunctionclassifyConnectionError
( error: unknown, connectorType: ConnectorType, sourceId: string )
src/utils/error-classifier.ts:60
↓ 15 callersFunctionisDriverNotInstalled
(err: unknown, driver: string)
src/utils/module-loader.ts:12
↓ 15 callersFunctionobfuscateDSNPassword
(dsn: string)
src/utils/dsn-obfuscate.ts:91
↓ 15 callersFunctionparseToolResponse
(response: any)
src/tools/__tests__/execute-sql.test.ts:31
↓ 14 callersMethodconnectWithSources
* Initialize and connect to multiple databases using source configurations * This is the new multi-source connection method
src/connectors/manager.ts:44
↓ 13 callersFunctiondetectParameterStyle
( statement: string )
src/utils/parameter-mapper.ts:27
↓ 13 callersFunctionlooksLikeSSHAlias
(host: string)
src/utils/ssh-config-parser.ts:217
↓ 12 callersFunctionbigIntReplacer
(_key: string, value: any)
src/utils/response-formatter.ts:14
↓ 12 callersMethodclose
* Close the SSH tunnel and clean up resources
src/utils/ssh-tunnel.ts:328
↓ 12 callersFunctionexpandHomeDir
* Expand ~ to home directory in paths
src/config/toml-loader.ts:744
↓ 12 callersMethodgetTables
* Get all tables in the database or in a specific schema * @param schema Optional schema name. If not provided, implementation should use the defau
src/connectors/interface.ts:181
↓ 12 callersMethodhasLimitClause
* Check if a SQL statement already has a LIMIT clause. * Strips comments and string literals first to avoid false positives.
src/utils/sql-row-limiter.ts:20
↓ 11 callersMethodgetAll
* Get requests, optionally filtered by source * Returns newest first
src/requests/store.ts:41
↓ 11 callersFunctionmakeJsonRpcCall
(method: string, params: any)
src/__tests__/json-rpc-integration.test.ts:128
↓ 11 callersFunctionresolveJumpHosts
( proxyJump: string, configPath: string, visited: Set<string> = new Set() )
src/utils/ssh-config-parser.ts:365
↓ 10 callersFunctionconflict
(field: string, fieldValue: string, dsnValue: string)
src/config/toml-loader.ts:273
↓ 10 callersFunctioncreateToolErrorResponse
(error: string, code: string = "ERROR", details?: any)
src/utils/response-formatter.ts:66
↓ 10 callersFunctionparseConnectionInfoFromDSN
(dsn: string)
src/utils/dsn-obfuscate.ts:24
↓ 10 callersFunctionresolveSymlink
(filePath: string)
src/utils/ssh-config-parser.ts:45
↓ 10 callersFunctionstartConfigWatcher
(options: ConfigWatcherOptions)
src/utils/config-watcher.ts:23
↓ 9 callersFunctionbuildInputSchema
(parameters: ParameterConfig[] | undefined)
src/tools/custom-tool-handler.ts:91
↓ 9 callersMethodcleanup
* Clean up resources. Closes all SSH clients in reverse order (innermost first).
src/utils/ssh-tunnel.ts:343
↓ 9 callersMethodclear
* Clear all requests (useful for testing)
src/requests/store.ts:63
↓ 9 callersFunctioncreateMockManager
(overrides: Partial<Record<string, any>> = {})
src/utils/__tests__/config-watcher.test.ts:19
↓ 9 callersFunctioncreateOptions
(connectorManager: ConnectorManager, initialTools?: any[])
src/utils/__tests__/config-watcher.test.ts:28
↓ 9 callersMethodgetConnectionUri
()
src/connectors/__tests__/shared/integration-test-base.ts:15
↓ 9 callersFunctionparseCommandLineArgs
()
src/config/env.ts:18
↓ 9 callersFunctionparseJumpHosts
(proxyJump: string)
src/utils/ssh-config-parser.ts:335
↓ 9 callersFunctionquoteQualifiedIdentifier
( tableName: string, schemaName: string | undefined, dbType: ConnectorType )
src/utils/identifier-quoter.ts:66
↓ 9 callersFunctionvalidateParameterStyle
( statement: string, connectorType: ConnectorType )
src/utils/parameter-mapper.ts:57
↓ 8 callersMethodestablish
* Establish an SSH tunnel, optionally through jump hosts (ProxyJump). * @param config SSH connection configuration * @param options Tunnel optio
src/utils/ssh-tunnel.ts:24
↓ 8 callersMethodgetTableSchema
* Get schema information for a specific table * @param tableName The name of the table to get schema information for * @param schema Optional sc
src/connectors/interface.ts:201
↓ 8 callersFunctionmapArgumentsToArray
( parameters: ParameterConfig[] | undefined, args: Record<string, any> )
src/utils/parameter-mapper.ts:179
↓ 8 callersMethodprepare
* Prepare a user-facing query statement with BigInt reads enabled, so 64-bit * integer values in the result rows keep full precision. * * bet
src/connectors/sqlite/index.ts:137
↓ 7 callersFunctiononChange
()
frontend/src/hooks/use-mobile.ts:12
↓ 7 callersMethodqueryAll
* Run an introspection query and return all rows. Integers come back as plain * numbers (no `setReadBigInts`), which is what the schema-reading cal
src/connectors/sqlite/index.ts:152
↓ 6 callersFunctiongetDatabaseTypeFromDSN
(dsn: string)
src/utils/dsn-obfuscate.ts:175
↓ 6 callersFunctiongetRawDSNQueryParam
* Read a query parameter's value from a DSN's raw query string, distinguishing * "absent" (returns null) from "present but empty" (returns ""). * *
src/config/toml-loader.ts:235
↓ 6 callersMethodgetSchemas
* Get all schemas in the database * @returns Promise with array of schema names
src/connectors/interface.ts:157
↓ 6 callersMethodgetSourceConfig
* Get source configuration by ID * @param sourceId - Source ID. If not provided, returns default (first) source config
src/connectors/manager.ts:404
↓ 6 callersFunctionisModuleNotFound
(err: unknown)
src/utils/module-loader.ts:38
↓ 6 callersFunctionlikePatternToRegex
* Convert SQL LIKE pattern to JavaScript regex * Supports % (any chars) and _ (single char)
src/tools/search-objects.ts:60
↓ 6 callersMethodregister
* Register a new connector
src/connectors/interface.ts:265
↓ 6 callersFunctionresolveId
()
src/config/env.ts:485
↓ 6 callersFunctionresolveSSHConfig
()
src/config/env.ts:506
↓ 6 callersMethodstop
()
src/connectors/__tests__/shared/integration-test-base.ts:16
↓ 6 callersFunctionvalidateParameters
( statement: string, parameters: ParameterConfig[] | undefined, connectorType: ConnectorType )
src/utils/parameter-mapper.ts:153
↓ 5 callersFunctionareAllStatementsReadOnly
(sql: string, connectorType: ConnectorType)
src/utils/__tests__/allowed-keywords.test.ts:8
↓ 5 callersFunctioncreateSourceConfigFromDSN
* Helper function to create a SourceConfig from a DSN for testing
src/connectors/__tests__/postgres-ssh.integration.test.ts:14
↓ 5 callersMethodforEachSearchParam
* Helper method to iterate over all parameters * * @param callback - Function to call for each parameter
src/utils/safe-url.ts:145
↓ 5 callersFunctionhasParam
(key: string)
src/config/toml-loader.ts:778
↓ 5 callersFunctioninitializeToolRegistry
(config: TomlConfig)
src/tools/registry.ts:274
↓ 5 callersFunctionloadConnectors
( connectorModules: ConnectorModule[] )
src/utils/module-loader.ts:56
↓ 5 callersFunctionplainToken
(i: number)
src/utils/sql-parser.ts:11
↓ 5 callersFunctionresolveDSN
()
src/config/env.ts:232
↓ 5 callersFunctionresolveDefaultSchemas
* Resolve the set of schemas a search should scope to when the caller did not * pass an explicit `schema` filter. * * Prefers the connector's defau
src/tools/search-objects.ts:80
↓ 5 callersFunctionscanDoubleQuotedString
(sql: string, i: number)
src/utils/sql-parser.ts:90
↓ 5 callersFunctionscanSingleQuotedString
(sql: string, i: number)
src/utils/sql-parser.ts:79
↓ 4 callersFunctioncreateToolSuccessResponse
(data: T, meta: Record<string, any> = {})
src/utils/response-formatter.ts:82
↓ 4 callersFunctionfitString
* Pad or truncate a string to fit a specific width
src/utils/startup-table.ts:76
↓ 4 callersFunctiongetDefaultPortForType
(type: ConnectorType)
src/utils/dsn-obfuscate.ts:204
↓ 4 callersFunctiongetExecuteSqlMetadata
(sourceId: string)
src/utils/tool-metadata.ts:114
↓ 4 callersMethodgetSampleDSN
* Generate a sample DSN string for this connector type
src/connectors/interface.ts:123
↓ 4 callersFunctiongetSearchObjectsMetadata
(sourceId: string)
src/utils/tool-metadata.ts:172
↓ 4 callersFunctiongetSelfHosts
()
src/utils/cross-origin.ts:86
↓ 4 callersFunctiongetTableComment
* Get table comment from the connector if supported.
src/tools/search-objects.ts:123
↓ 4 callersFunctiongetToolRegistry
()
src/tools/registry.ts:282
↓ 4 callersFunctionhorizontalLine
* Generate a horizontal line of specified width
src/utils/startup-table.ts:69
↓ 4 callersMethodisBuiltinTool
* Check if a tool name is a built-in tool
src/tools/registry.ts:25
↓ 4 callersMethodisValidDSN
* Check if a DSN is valid for this connector
src/connectors/interface.ts:128
↓ 4 callersFunctionparseNonNegativeInteger
(value: string, name: string)
src/config/env.ts:609
next →1–100 of 717, ranked by callers