Documentation
¶
Overview ¶
Package sqlinspect provides reusable, read-only SQL catalog inspection.
Index ¶
Constants ¶
View Source
const ( DefaultMaxRelations = 5000 DefaultMaxColumns = 50000 DefaultMaxRoutines = 2000 DefaultMaxDefinitionBytes = 4 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Catalog ¶
type Catalog struct {
Driver string `json:"driver"`
Database string `json:"database,omitempty"`
Databases []string `json:"databases,omitempty"`
DefaultSchema string `json:"defaultSchema,omitempty"`
Schemas []Schema `json:"schemas"`
Truncated bool `json:"truncated,omitempty"`
TruncateReason string `json:"truncateReason,omitempty"`
Cache *inspection.CacheMetadata `json:"cache,omitempty"`
}
type Column ¶
type Column struct {
Name string `json:"name"`
DataType string `json:"dataType,omitempty"`
Ordinal int `json:"ordinal,omitempty"`
Nullable *bool `json:"nullable,omitempty"`
Default *string `json:"default,omitempty"`
Identity bool `json:"identity,omitempty"`
PrimaryKey bool `json:"primaryKey,omitempty"`
Unique bool `json:"unique,omitempty"`
MaxLength *int `json:"maxLength,omitempty"`
NumericPrecision *int `json:"numericPrecision,omitempty"`
NumericScale *int `json:"numericScale,omitempty"`
Comment *string `json:"comment,omitempty"`
EnumValues []string `json:"enumValues,omitempty"`
}
type ForeignKey ¶ added in v0.1.32
type Relation ¶
type Relation struct {
Name string `json:"name"`
Type string `json:"type"`
ViewDef string `json:"viewDefinition,omitempty"`
Columns []Column `json:"columns"`
Indexes []Index `json:"indexes,omitempty"`
ForeignKeys []ForeignKey `json:"foreignKeys,omitempty"`
Triggers []Trigger `json:"triggers,omitempty"`
}
type RoutineParameter ¶ added in v0.1.32
Click to show internal directories.
Click to hide internal directories.