我可以使用TypeORM QueryBuilder编写以下查询来获得SQL方言不可知的查询吗?
select *
from mytable
where mycol1 = 'foo'
and mycol2 = (select max(mycol2)
from mytable
where mycol1 = 'foo');
const result = await getRepository(entity_name)
.createQueryBuilder("my_table")
.select("*")
.where("my_table.mycol1 = :value AND my_table.mycol2 = (select MAX(my_table.mycol2) FROM my_table WHERE my_table.mycol1 = :value)", { value: 'foo' })
.getMany();