a very basic implementation of sql templates