Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
Query represents a tool for executing SQL queries against Firebolt databases. It handles connecting to the appropriate account, database, and engine before executing the query and returning results.
func NewQuery ¶
NewQuery creates a new instance of the Query tool with the provided database connection pool. The connection pool is responsible for managing connections to different Firebolt account/database/engine combinations.
func (*Query) Handler ¶
func (t *Query) Handler() mcp.ToolHandlerFor[Input, *Output]
Handler processes tool invocation requests and executes SQL queries against Firebolt. It performs the following steps: 1. Extracts and validates required/optional parameters from the request 2. Acquires a database connection from the pool using the specified parameters 3. Executes the query against the database 4. Returns the query results as JSON