"""CSV data loading, schema handling, cleaning, and SQLite persistence.

Package layout:
    _csv.py    — CSV scanning, BOM/encoding detection, :func:`load_csv_directory`
    _schema.py — Schema merging and cross-file validation
    _clean.py  — Data cleaning helpers (:func:`_coerce_to_float`)
    _sqlite.py — SQLite persistence (save/load/drop tables)
"""

from ._csv import (
    SUPPORTED_ENCODINGS,
    detect_bom,
    collect_schema,
    detect_schema_dtypes,
    load_config,
    _file_count,
    _resolve_encoding,
    load_csv_directory,
)
from ._schema import _merge_schema_entries, validate_schemas
from ._clean import _coerce_to_float
from ._sqlite import (
    _dtype_to_sqlite,
    _str_to_polars_dtype,
    _rows_to_csv_df,
    save_to_db,
    load_from_db,
    load_from_db_lazy,
    drop_sqlite_table,
)
