Upgrading QL to use sqlgen.