canonical / sqlair

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

Add SetContext to Query #67

Closed Aflynn50 closed 1 year ago

Aflynn50 commented 1 year ago

This PR adds a SetContext method to Query that can be used to update the context of an existing query to allow for reuse of that query.

This PR moves the ctx parameter from db.Query/tx.Query to Get/Iter/GetAll since these methods are the point at which the actual query is executed. This is in light of comments on #66.