Versions in this module Expand all Collapse all v0 v0.1.0 Apr 24, 2026 Changes in this version + const DefaultStatementTimeout + var ErrAmbiguousTable = errors.New("table name is ambiguous across schemas") + var ErrTableNotFound = errors.New("table not found") + func MergeTLSParams(dsn string, p TLSParams) (string, error) + type AmbiguousTableError struct + Schemas []string + TableName string + func (e *AmbiguousTableError) Error() string + func (e *AmbiguousTableError) Unwrap() error + type ClusterInfo struct + ClusterID string + Version string + type ColumnMeta struct + Name string + Type string + type DDLExplainResult struct + Operations []DDLOperation + RawText string + Statement string + type DDLOperation struct + Op string + Targets []string + type ExecuteOptions struct + MaxRows int + Mode safety.Mode + type ExecuteResult struct + Columns []ColumnMeta + CommandTag string + LimitInjected *int + Rows [][]any + RowsAffected int64 + RowsReturned int + Truncated bool + type ExplainAnyResult struct + DDLPlan *DDLExplainResult + Plan *ExplainResult + Strategy Strategy + type ExplainResult struct + Header map[string]string + Plan []PlanNode + RawRows []string + type ListOptions struct + IncludeSystem bool + type Manager struct + func NewManager(dsn string, opts ...Option) *Manager + func (m *Manager) Close(ctx context.Context) error + func (m *Manager) DescribeTableFromCluster(ctx context.Context, tableName string) (catalog.Table, error) + func (m *Manager) Execute(ctx context.Context, sql string, opts ExecuteOptions) (ExecuteResult, error) + func (m *Manager) Explain(ctx context.Context, sql string) (ExplainResult, error) + func (m *Manager) ExplainAnalyze(ctx context.Context, sql string) (ExplainResult, error) + func (m *Manager) ExplainAny(ctx context.Context, sql string) (ExplainAnyResult, error) + func (m *Manager) ExplainDDL(ctx context.Context, sql string) (DDLExplainResult, error) + func (m *Manager) GetTableStats(ctx context.Context, schema, table string) (TableStat, error) + func (m *Manager) ListTablesFromCluster(ctx context.Context, opts ListOptions) ([]TableRef, error) + func (m *Manager) Ping(ctx context.Context) (ClusterInfo, error) + func (m *Manager) Simulate(ctx context.Context, sql string) (SimulateResult, error) + type Option func(*Manager) + func WithStatementTimeout(d time.Duration) Option + type PlanNode struct + Attrs map[string]string + Children []PlanNode + Op string + type SimulateResult struct + Steps []SimulateStep + func (r SimulateResult) StepFailureSummary() (msg string, planFails, statsFails []int, ok bool) + type SimulateStep struct + DDLPlan *DDLExplainResult + Error string + Plan *ExplainResult + SQL string + StatementIndex int + StatsError string + Strategy Strategy + TableStats []TableStat + Tag string + type Strategy string + const StrategyExplain + const StrategyExplainAnalyze + const StrategyExplainDDL + type TLSParams struct + SSLCert string + SSLKey string + SSLMode string + SSLRootCert string + func (p TLSParams) IsZero() bool + type TableRef struct + Name string + Schema string + type TableStat struct + CollectedAt string + RowCount int64 + Schema string + Source string + Table string