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-06-21 07:57:36 +08:00
Code Issues Packages Projects Releases Wiki Activity
Files
master
gf/contrib/drivers/pgsql/testdata/table_with_prefix.sql

7 lines
170 B
MySQL
Raw Permalink Normal View History

test(contrib/drivers/pgsql): add Union, DO and Raw Where test coverage (#4679) ## Summary - Add `pgsql_z_unit_feature_union_test.go`: 4 tests for Union/UnionAll on both db and model level - Add `pgsql_z_unit_feature_model_do_test.go`: 10 tests for DO (Data Object) pattern - insert, batch insert, update, pointer fields, WHERE, DAO pattern, and field prefix handling - Enhance `pgsql_z_unit_raw_test.go`: add `Test_Raw_Where` for subquery NOT EXISTS and field comparison using `gdb.Raw()`, adapted for PgSQL double-quote quoting - Add `testdata/table_with_prefix.sql` for PgSQL-compatible FieldPrefix test All tests adapted from MySQL driver test suite with PgSQL-specific adjustments: - Nullable table schema for DO partial inserts (PgSQL NOT NULL is stricter than MySQL) - Double-quote identifier quoting instead of backticks - Unquoted table aliases in generated SQL ## Test plan - [x] All 15 new tests pass locally - [x] Full pgsql test suite (107 tests) passes with zero regressions ref #4689 --------- Co-authored-by: John Guo <claymore1986@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-11 14:41:42 +08:00
DROP TABLE IF EXISTS instance;
CREATE TABLE instance (
f_id SERIAL NOT NULL PRIMARY KEY,
name varchar(255) DEFAULT ''
);
INSERT INTO instance VALUES (1, 'john');
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 33ms 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