Split the query builder visitor to its own source file.