schema

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package schema implements the read-only exploration commands that mirror the original MCP's get_schema_info, get_table_sample, list_resources and read_resource. All identifiers are validated before interpolation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyze

func Analyze(ctx context.Context, pool *conn.Pool, table string) (result.Result, error)

Analyze returns a combined view: schema columns followed by a 5-row sample. Rows are tagged by section in the first column so an agent can distinguish.

func Databases

func Databases(ctx context.Context, pool *conn.Pool) (result.Result, error)

Databases lists non-system databases.

func Explore

func Explore(ctx context.Context, pool *conn.Pool) (result.Result, error)

Explore returns one row per (database, table) across non-system databases.

func Read

func Read(ctx context.Context, pool *conn.Pool, table string) (result.Result, error)

Read returns up to 100 rows from a table (mirrors read_resource).

func Sample

func Sample(ctx context.Context, pool *conn.Pool, table string, limit int) (result.Result, error)

Sample returns up to limit rows from table; limit is clamped to [1,20].

func Schema

func Schema(ctx context.Context, pool *conn.Pool, table string) (result.Result, error)

Schema returns column metadata for one table, or all tables when table is empty.

func Tables

func Tables(ctx context.Context, pool *conn.Pool, db string) (result.Result, error)

Tables lists tables in db (or the current database if db is empty).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL