staab / janet-pqutils

A utility library for Janet and janet-pq.
MIT License
8 stars 0 forks source link

Add exec_lazy #2

Closed staab closed 4 years ago

staab commented 4 years ago

As far as I can tell, the most general purpose way to return results would be to create a fiber and yield from within it. This would require creating a result wrapper that would call PQclear when garbage collected. It would also require figuring out how the heck to yield from a c function 🤔.

staab commented 4 years ago

Solution here is to return a Result abstract type and allow checking size and yielding one row at a time from janet code.