swig templating for SQL