Logo
Explore Help
Register Sign In
bingyi/gf
1
0
Fork 0
You've already forked gf
mirror of https://gitee.com/johng/gf synced 2026-07-05 05:13:14 +08:00
Code Issues Packages Projects Releases Wiki Activity
Files
e3e3a8868e74562bd4859c4eb58ceeabdf4a32df
gf/contrib/drivers/pgsql/testdata/with_tpl_user.sql

5 lines
92 B
MySQL
Raw Normal View History

test(contrib/drivers/pgsql): add SoftTime, With, ScanList test coverage (#4676) ## Summary - Add 3 new test files for pgsql driver (39 test functions, ~3800 lines) - `pgsql_z_unit_feature_soft_time_test.go`: 15 tests — soft delete (SoftDeleted/Unscoped), auto time fields (CreatedAt/UpdatedAt/DeletedAt), time format options - `pgsql_z_unit_feature_with_test.go`: 17 tests — With relation queries (one-to-one, one-to-many, many-to-many), nested With, WithAll, conditional With - `pgsql_z_unit_feature_scanlist_test.go`: 7 tests — ScanList relation mapping for struct slices - Add testdata SQL templates for With tests **PostgreSQL adaptations from MySQL:** - `AUTO_INCREMENT` → `SERIAL/BIGSERIAL` - `datetime` → `timestamp` - MySQL backticks → PostgreSQL double quotes for identifiers - Timestamp format handling for soft time fields ## Test plan - [x] Run `go test -v -run "Test_Model_Soft" -count=1` in `contrib/drivers/pgsql` - [x] Run `go test -v -run "Test_Model_With" -count=1` in `contrib/drivers/pgsql` - [x] Run `go test -v -run "Test_Model_ScanList" -count=1` in `contrib/drivers/pgsql` ref #4689
2026-02-26 09:49:48 +08:00
CREATE TABLE IF NOT EXISTS %s (
id SERIAL PRIMARY KEY,
name varchar(45) NOT NULL
);
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 42ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API