canonical / sqlair

Friendly type mapping for SQL databases
Apache License 2.0
17 stars 9 forks source link

Add Prepare stage for outputs #33

Closed Aflynn50 closed 1 year ago

Aflynn50 commented 1 year ago

This PR adds the prepare stage for outputs. The prepare function takes instansiations of all the types mentioned in the output expressions of the query. The output expressions are checked against these types. If an output expression contains a * this is substituted for a list of all the tags in the output expression struct.

All output expression columns are given an alias with prefix _sqlair and suffix _n where n is the position of the output in the query. This will be used in the scan/decode stage to retrieve the relevant columns.