Commit Graph

24 Commits

Author SHA1 Message Date
Ruben de Vries c44c6027fb add an override on the DB instance instead of using the global NowFunc. (#2142) 2019-06-11 12:22:21 +08:00
Ali Koyuncu 8b07437717 add mysql insert modifiers (#2269) 2019-03-10 20:17:21 +08:00
Jinzhu 3b2c4b3608 Fix insert with default value for mysql 2018-02-12 17:39:34 +08:00
Jinzhu 7a8c2bbff8 Refactor build SQL condition 2018-02-12 00:06:31 +08:00
Jinzhu e5432b14d2 Add QueryExpr, thanks @ManReinsp for PR #1548 2017-08-11 18:41:04 +08:00
Jinzhu 969ab67636 [mssql] Fix save time struct's timezone 2017-08-11 17:18:49 +08:00
Jinzhu 35fb16eeba Don't overwrite existing timestamp when creating 2017-07-31 17:26:36 +08:00
Jinzhu 5730b92954 Fix tests with mssql 2017-03-22 23:50:42 +08:00
DiSiqueira 2cd7acefc3 Fixing 4 typos in comments and gofmt -s in all files 2017-02-10 16:16:38 -02:00
Jinzhu 5d853fc53c Fix null time not allowed in mysql5.7 test error 2016-10-19 12:20:45 +08:00
Christophe de Vienne 328fe672c8 Test AUTO_INCREMENT only on postgres
Only the postgres dialect handles AUTO_INCREMENT on non-primary key.
So we skip the auto increment test for other dialects.

The mysql case is a little trickier because the simple presence of the
'AUTH_INCREMENT' tag produces a faulty 'CREATE TABLE' statement. Hence
we need to remove it when present.
2016-06-20 16:00:38 +02:00
Christophe de Vienne 608fd976c4 Fix auto_increment on postgres database. 2016-06-20 15:00:19 +02:00
Jinzhu d08894cd69 Rename test files 2016-03-08 22:00:15 +08:00
Jinzhu 3a9367612e Port changes made in PR #652 2016-01-05 08:34:17 +08:00
Jinzhu f8c3ad6af3 Format time first when testing 2015-12-25 11:50:55 +08:00
Jinzhu 187eae8d9c Update with Select and Omit 2015-03-12 18:30:59 +08:00
Jinzhu 5d52826b3d Create with Omit 2015-03-12 18:01:27 +08:00
Jinzhu ad251b9deb Create with Select 2015-03-12 17:47:31 +08:00
Paolo Galeone 0fa1335555 Avoid Errors in postgres when creating a row without a GORM defined primary key (but defined db-side) 2014-12-08 11:33:30 +01:00
Paolo Galeone 064d91335b Add default values support ( https://github.com/jinzhu/gorm/issues/251 ) 2014-11-15 18:32:35 +01:00
Jinzhu 423d9496c1 update tests 2014-08-28 16:14:44 +08:00
Jinzhu 0c63e57f5c Use tag to set primary key 2014-07-29 18:21:36 +08:00
Jinzhu 468e54f0ee Refact tests 2014-07-29 16:04:40 +08:00
Jinzhu cb7d545ac0 Refact tests 2014-07-29 11:38:28 +08:00