We continue buildling our PostgreSQL wrapper. This time, we add the possibility of using queries with properly escaped parameters. To achieve this, we have to dive deep into Swift's unsafe pointer APIs.
In this episode, we make a custom collection conform to Sequence. This allows us to efficiently iterate over the elements, and we gain all the useful functionality of Sequence.
We show how to make an extension on array available to other collections: first, we implement it for array slices, then we implement it as a protocol extension for all collections.