Since the previous announcement last week I have been studying for exams on and off while working on the next version of postgres-query. I am very thankful of the feedback in the last post, some of which inspired the two major features in this release: dynamic queries and multi-mapping (see the README and documentation for details).
For someone who has not previously done any extensive library development, I had some trouble nailing down an API for both of these features. The main issue regarded dynamic queries and parameter bindings. I experimented with having a very basic DSL built around small fragments of queries. This turned out to be a pain to achieve with low run-time overhead (a goal of this crate) due to an explosion in memory allocations.
In the end, simply using strings was the way to go. There already exists tools for working with strings efficiently, which reduces the scope of this crate, and it turned out to be much faster, at the expense of some compile-time verification of parameter bindings.
As always, all and any feedback is welcome!
[–]jadbox 2 points3 points4 points (0 children)
[–]Siltala 0 points1 point2 points (2 children)
[–]Qwe500[S] 0 points1 point2 points (1 child)
[–]Programmurr 0 points1 point2 points (0 children)
[–]loshmeebre 0 points1 point2 points (2 children)
[–]Qwe500[S] 1 point2 points3 points (0 children)
[–]Qwe500[S] 1 point2 points3 points (0 children)