Turn queries with parameters into prepared queries