MechanicalRabbit / FunSQL.jl

Julia library for compositional construction of SQL queries
https://mechanicalrabbit.github.io/FunSQL.jl
Other
150 stars 6 forks source link

Track scalar types #54

Open xitology opened 7 months ago

xitology commented 7 months ago

Currently, FunSQL tracks the names and the order of the output columns, but it does not distinguishes their types.

To fix this, FunSQL needs to:

Column information could be stored in a structure SQLColumn(name, type) with SQLTable.columns becoming an OrderedDict{Symbol, SQLColumn}. Accidentally, it will allow a column to have a FunSQL name that differs from its SQL name.

It is much harder to implement type resolution for arbitrary expressions. We could start by allowing the user to explicitly declare the result type of a particular function or an operator call.