Documentation
¶
Index ¶
- type Config
- type Connector
- func (c Connector) Config() connectors.Config
- func (c Connector) Discovery(ctx context.Context, tablesList []string) ([]model.Table, error)
- func (c *Connector) GuessColumnType(sqlType string) model.ColumnType
- func (c *Connector) InferQuery(ctx context.Context, query string) ([]model.ColumnSchema, error)
- func (c Connector) LoadsColumns(ctx context.Context, tableName string) ([]model.ColumnSchema, error)
- func (c Connector) Ping(ctx context.Context) error
- func (c Connector) Query(ctx context.Context, endpoint model.Endpoint, params map[string]any) ([]map[string]any, error)
- func (c Connector) Sample(ctx context.Context, table model.Table) ([]map[string]any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Hosts []string `json:"hosts" yaml:"hosts"` // List of database file paths
Database string `json:"database" yaml:"database"` // Database file name
ReadOnly bool `json:"read_only" yaml:"read_only"` // Whether to open database in read-only mode
Memory bool `json:"memory" yaml:"memory"` // Whether to create an in-memory database
ConnString string `json:"conn_string" yaml:"conn_string"` // Direct connection string
}
Config represents the configuration for a SQLite connection
func (Config) ConnectionString ¶
ConnectionString generates a connection string for SQLite
func (Config) ExtraPrompt ¶
ExtraPrompt returns additional prompt information for the configuration
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements the yaml.Unmarshaler interface
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
Connector implements the connectors.Connector interface for SQLite
func (Connector) Config ¶
func (c Connector) Config() connectors.Config
func (*Connector) GuessColumnType ¶
func (c *Connector) GuessColumnType(sqlType string) model.ColumnType
GuessColumnType implements TypeGuesser interface for SQLite
func (*Connector) InferQuery ¶
func (Connector) LoadsColumns ¶
Click to show internal directories.
Click to hide internal directories.