mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
## Summary - Add full test infrastructure (`mariadb_unit_init_test.go`) with MariaDB-specific helpers (createTable, createInitTable, dropTable) matching the MySQL test baseline - Port 4 basic tests from MySQL: `Test_New`, `Test_DB_Ping`, `Test_DB_Query`, `Test_DB_Exec` - Port 47 core tests covering CRUD operations, raw SQL, schema switching, and DB/TX method parity - Port 55 model tests covering Model API: Fields, Where, Scan, Save, Replace, InsertIgnore, InsertGetId, OmitEmpty, Distinct, Count/Min/Max/Avg/Sum, HasField, chained operations, testdata SQL-based scenarios and more - Add 5 testdata SQL files required by model tests (copied from MySQL baseline) 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 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
9 lines
402 B
SQL
9 lines
402 B
SQL
CREATE TABLE `date_time_example` (
|
|
`id` int unsigned NOT NULL AUTO_INCREMENT,
|
|
`year` year DEFAULT NULL COMMENT 'year',
|
|
`date` date DEFAULT NULL COMMENT 'Date',
|
|
`time` time DEFAULT NULL COMMENT 'time',
|
|
`datetime` datetime DEFAULT NULL COMMENT 'datetime',
|
|
`timestamp` timestamp NULL DEFAULT NULL COMMENT 'Timestamp',
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |