Skip to main content

Crate datacraft_csv

Crate datacraft_csv 

Source
Expand description

CSV directory driver for the DataCraft engine (phase 30, item M18; ADR-7): the out-of-tree proof that a capability-poor data source docks through the core-owned StoragePort alone — this crate depends on nothing but datacraft-core.

A database is a directory; its tables are the *.csv files inside. The header row names the columns, every column is Short Text, and any write rewrites the whole file once (sibling temp file + rename), so a call is atomic — either every operation of the call lands or none. Rows are addressed positionally in file order (data rows after the header). Non-text domain values render deterministically through the core’s cell display (Null becomes an empty cell).

§Column type inference (L7)

The schema kind of each column is inferred at open, deterministically, from a full scan: all-integer columns become LongInteger, all-float columns Double, all-ISO-date columns (YYYY-MM-DD) DateTime; anything else — and every ambiguous column — stays Short Text. Quoting is the user’s escape hatch: one quoted cell pins the whole column to Short Text, and empty cells don’t vote. Cell values still read as text; only the schema kind is inferred (the datasheet formats and parses by the declared kind). The inference and the quote mask live in datacraft_core::import — shared with the ImportFile chain (M50).

Structs§

CsvPort
One CSV directory as a database.