gorm 使用子查询查询数据
我想实现如下SQL的查询
1 | >SELECT id,hostname FROM `physical_nodes` WHERE `physical_nodes`.`deleted_at` IS NULL AND ((model = '' and id not in ((SELECT hid FROM `hardware_infos` WHERE (cpu_core = '' or mem_size = '' or |
通过gorm 实现
1 | ds := db.GetDB() |