Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ColumnDef ¶ added in v1.0.0
ColumnDef defines a column with its name and inferred type
func InferColumnTypes ¶ added in v1.0.0
InferColumnTypes analyzes sample data to infer the best type for each column It uses the most restrictive type that can represent all values: BIGINT -> DOUBLE -> VARCHAR (BOOLEAN is special-cased)
type DataType ¶ added in v1.0.0
type DataType string
DataType represents the detected type of a column
type Storage ¶
type Storage interface {
BuildStructure(string, []string) error
InsertRow(string, []string, []any) error
Query(cmd string) (*sql.Rows, error)
ShowTables() (*sql.Rows, error)
Close() error
}
Storage is the main interface for data storage operations
type TypedStorage ¶ added in v1.0.0
type TypedStorage interface {
Storage
BuildStructureWithTypes(tableName string, columns []ColumnDef) error
InsertRowWithCoercion(tableName string, columns []string, values []any, columnDefs []ColumnDef) error
}
TypedStorage is an optional interface for storage implementations that support typed columns for better query compatibility
Click to show internal directories.
Click to hide internal directories.