change sql generator to prepared statement generator