After much contemplation I realized that my previous approach to solving this execute query template function problem was more wrong than right. Several days of staring at and reading about variadic templates later I figured out the correct way to accomplish my goal.
Adding sqlite proof-of-concept. This code does not compile due to some template issues but I want to keep track of it none the less.