MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / Loader

Interface Loader

pkg/schema/db/loader.go:22–28  ·  view source on GitHub ↗

Loader connects to a live database and reads its schema metadata. Dialect-specific implementations are provided in pkg/schema/postgres, pkg/schema/mysql, and pkg/schema/sqlite.

Source from the content-addressed store, hash-verified

20// Dialect-specific implementations are provided in pkg/schema/postgres,
21// pkg/schema/mysql, and pkg/schema/sqlite.
22type Loader interface {
23 // Load returns the full schema for all user tables in the database.
24 // schemaName may be empty to use the database default.
25 Load(db *sql.DB, schemaName string) (*DatabaseSchema, error)
26 // LoadTable returns schema for a single named table.
27 LoadTable(db *sql.DB, schemaName, tableName string) (*Table, error)
28}

Implementers 3

Loaderpkg/schema/postgres/loader.go
Loaderpkg/schema/mysql/loader.go
Loaderpkg/schema/sqlite/loader.go

Calls

no outgoing calls

Tested by

no test coverage detected