mirror of
https://gitee.com/johng/gf
synced 2026-07-03 20:01:04 +08:00
## Summary - Port 25 SQL builder tests: WhereBuilder chaining, complex Where/WhereOr/WhereNot combinations, nested builders, Build() output verification - Port 9 subquery tests: subquery in Where/Having/From, correlated subqueries, subquery with Model builder - Port 11 struct-mapping tests: Scan to struct/slice, embedded structs, tag-based field mapping, pointer fields, OmitEmpty with struct input - Port 12 join tests: LeftJoin/RightJoin/InnerJoin, multi-table joins, join with Where/Order/Fields, subquery joins, testdata SQL-based join scenarios - Port 8 batch operation tests: Batch insert/update/replace/save with configurable batch size, conflict handling - Port 4 cache tests: query result caching, cache invalidation on update/delete, cache duration, ClearCache - Port 4 OmitNil/OmitEmpty tests: nil field omission in insert/update, zero-value vs nil distinction All tests are structurally identical to the MySQL driver baseline. SQL syntax is standard and shared. Package and import references are adapted for MariaDB. ref #4689
1 line
1009 B
SQL
1 line
1009 B
SQL
SELECT `managed_resource`.`resource_id`,`managed_resource`.`user`,`managed_resource`.`status`,`managed_resource`.`status_message`,`managed_resource`.`safe_publication`,`managed_resource`.`rule_template_id`,`managed_resource`.`created_at`,`managed_resource`.`comments`,`managed_resource`.`expired_at`,`managed_resource`.`resource_mark_id`,`managed_resource`.`instance_id`,`managed_resource`.`resource_name`,`managed_resource`.`pay_mode`,`resource_mark`.`mark_name`,`resource_mark`.`color`,`rules_template`.`name`,`common_resource`.`src_instance_id`,`common_resource`.`database_kind`,`common_resource`.`source_type`,`common_resource`.`ip`,`common_resource`.`port` FROM `managed_resource` LEFT JOIN `common_resource` ON (`managed_resource`.`resource_id`=`common_resource`.`resource_id`) LEFT JOIN `resource_mark` ON (`managed_resource`.`resource_mark_id` = `resource_mark`.`id`) LEFT JOIN `rules_template` ON (`managed_resource`.`rule_template_id` = `rules_template`.`template_id`) ORDER BY `src_instance_id` ASC |