canonical / sqlair

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

Add Prepare stage for inputs #28

Closed Aflynn50 closed 1 year ago

Aflynn50 commented 1 year ago

This PR contains the Prepare stage for input parts. In the prepare stage the user passes instantiations of every Go struct that is mentioned in an input or output expression. These objects are used only for information about their type, the actual values inside the structs are irrelevant.

The prepareInput function checks that the structs and tags mentioned in IO expressions in the query correspond to the types of the objects passed as arguments to Prepare.

This PR is an updated version of #24 which was a draft PR. However since the name of the branch needed changing this PR has been created.