Express connection between SQL tables and columns in the Rust type system #218

Open
opened 2020-08-06 16:56:50 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:56:50 +00:00 (Migrated from github.com)

In #640, I observed an infelicity in the way that we strongly type SQL tables (DatomsTable) and associated SQL columns (special types like DatomsColumn). When we add FROM sources, column bindings, and column constraints, we generally don't have a strong type constraint on the table and associated columns. This ticket tracks making the Rust type system help us avoid errors. I haven't thought through this yet, but my first notion is to represent a table by a trait with an associated type representing specific columns.

In #640, I observed an infelicity in the way that we strongly type SQL tables (`DatomsTable`) and associated SQL columns (special types like `DatomsColumn`). When we add `FROM` sources, column bindings, and column constraints, we generally don't have a strong type constraint on the table and associated columns. This ticket tracks making the Rust type system help us avoid errors. I haven't thought through this yet, but my first notion is to represent a table by a trait with an associated type representing specific columns.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#218
No description provided.