mirror of
https://gitee.com/johng/gf
synced 2026-07-08 22:40:30 +08:00
## Summary - Port 3 test files and 4 testdata SQL files from PgSQL driver to GaussDB driver - Add `gaussdb_z_unit_feature_soft_time_test.go` (15 tests): soft time create/update/delete, bool/int/datetime soft delete - Add `gaussdb_z_unit_feature_with_test.go` (6 tests): With/WithAll ORM relation queries, multiple dependency levels - Add `gaussdb_z_unit_feature_scanlist_test.go` (9 tests): ScanList for 1:1, 1:N, N:N relation mapping - Add 4 testdata SQL files for With relation tests - **30 new test functions**, ~3,941 net new lines ## Test plan - [x] `go build ./...` passes - [x] `gofmt` and `gci` applied - [x] No remaining `pgsql` references in new files - [ ] Run full test suite against GaussDB instance ref #4689 --------- Co-authored-by: John Guo <claymore1986@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
31 lines
863 B
SQL
31 lines
863 B
SQL
|
|
CREATE TABLE table_a (
|
|
id SERIAL PRIMARY KEY,
|
|
alias varchar(255) DEFAULT ''
|
|
);
|
|
|
|
INSERT INTO table_a VALUES (1, 'table_a_test1');
|
|
INSERT INTO table_a VALUES (2, 'table_a_test2');
|
|
|
|
CREATE TABLE table_b (
|
|
id SERIAL PRIMARY KEY,
|
|
table_a_id integer NOT NULL,
|
|
alias varchar(255) DEFAULT ''
|
|
);
|
|
|
|
INSERT INTO table_b VALUES (10, 1, 'table_b_test1');
|
|
INSERT INTO table_b VALUES (20, 2, 'table_b_test2');
|
|
INSERT INTO table_b VALUES (30, 1, 'table_b_test3');
|
|
INSERT INTO table_b VALUES (40, 2, 'table_b_test4');
|
|
|
|
CREATE TABLE table_c (
|
|
id SERIAL PRIMARY KEY,
|
|
table_b_id integer NOT NULL,
|
|
alias varchar(255) DEFAULT ''
|
|
);
|
|
|
|
INSERT INTO table_c VALUES (100, 10, 'table_c_test1');
|
|
INSERT INTO table_c VALUES (200, 10, 'table_c_test2');
|
|
INSERT INTO table_c VALUES (300, 20, 'table_c_test3');
|
|
INSERT INTO table_c VALUES (400, 30, 'table_c_test4');
|