Commit Graph

2243 Commits

Author SHA1 Message Date
yrong1997 d7911300f8
Respect ignore migration when add column (#4276)
continue https://github.com/go-gorm/gorm/pull/4028
2021-04-13 09:39:43 +08:00
Jinzhu d278ca49ef sort GORM options before apply 2021-04-09 11:43:24 +08:00
Jinzhu ad53074f1d Pass db error to new instance 2021-04-09 11:07:14 +08:00
Jinzhu f3bdfa8261 Add IgnoreRecordNotFoundError option for logger 2021-04-09 10:21:01 +08:00
Jinzhu 673053f56a Fix context cancel error, close #4259, close #4260 2021-04-09 10:21:01 +08:00
gavwu 8cfa9d98f0
Update field.go (#4228)
seems like the `if-else` branch do the same thing, so remove it
2021-04-02 09:56:38 +08:00
Jinzhu 33601dc72f Support Having w/o Group 2021-03-30 18:28:09 +08:00
Jinzhu 73c6d3e64e Add AfterInitialize error 2021-03-29 18:36:01 +08:00
Jinzhu 0eba7a9ed1 Fix apply option 2021-03-26 14:20:42 +08:00
Jinzhu a8b72546c1 Fix get database connection for prepared stmt, close #4214 2021-03-25 10:17:57 +08:00
Jinzhu 26e0c6fb69 skip test sqlserver due to it will raise data race for invalid sql 2021-03-24 17:12:30 +08:00
Jinzhu 88078e48d0 Remove sqlite_windows test case 2021-03-24 16:56:41 +08:00
Jinzhu 8204d0ada2 Update tests script 2021-03-24 16:44:51 +08:00
Jinzhu 704e53a774 Call scopes before parse model value, close #4209 2021-03-24 16:35:39 +08:00
Jinzhu 4d5cec8bdd Add golang 1.16 2021-03-24 14:22:36 +08:00
Genta Kamitani 26dd4c980a
Fix: FindInBatches ignores errors (#4203) 2021-03-22 14:11:07 +08:00
Jinzhu 8c92d9694a Fix to call Scopes with using Migrator 2021-03-19 16:34:51 +08:00
Jinzhu a9fe025ef5 Add GetDBConnector interface 2021-03-19 15:55:38 +08:00
Jinzhu 220349ccf2 Fix omit associations, close #4161 2021-03-19 15:15:26 +08:00
Jinzhu e85b73e5a5 Fix nested Scopes, close #4196 2021-03-19 13:44:25 +08:00
Jinzhu a3d9bbfc36 build *clause.Expr 2021-03-19 13:21:43 +08:00
Jinzhu 27bb9137d3 Refactor OnConflict.UpdateALl 2021-03-18 11:44:20 +08:00
heige 07f3795f93
optimize MigrateColumn method for regexp (#4188) 2021-03-17 11:32:17 +08:00
Jinzhu 2055e29eb8 Refactor nested preload all associations 2021-03-14 10:42:58 +08:00
ruozhixian c575a4e719 support to preload all children in multiple levels associations 2021-03-11 16:36:49 +08:00
Jinzhu 912360097a Fix Scopes with Migrator, close #4145 2021-03-11 10:36:14 +08:00
Jinzhu 9fccb17d07 Fix double pointer for where conditions, close #4159 2021-03-10 19:46:59 +08:00
Jinzhu 14b9bd163c Don't panic when using nil pointer, close #4168 2021-03-10 19:32:56 +08:00
Jinzhu 675de6fc16 Clear scopes before invoke scopes methods 2021-03-08 19:21:09 +08:00
Shubhendra Singh Chauhan 0348b1d3c1
chore: improve code quality (#4123)
* Combine multiple `append`s into a single call

* Clean up copied struct fields with type conversion

* Remove unnecessary use of slice
2021-03-08 10:46:43 +08:00
heige 02cb40531e
Optimize parse constraint (#4153)
* for Config.cacheStore store PreparedStmtDB key

* invalid db error and value and invalid value length error (#4151)

* support named params in Select API  (#4142)

* adds support for named arguments in select

* changes clause identifies and adds test

* optimize match english letters and midline

Co-authored-by: Ratan Phayade <ratanphayade@users.noreply.github.com>
2021-03-08 10:21:33 +08:00
heige 221d0a0ec1
optimize value of reflection length (#4152) 2021-03-08 10:20:04 +08:00
Ratan Phayade a3abb5fedf
support named params in Select API (#4142)
* adds support for named arguments in select

* changes clause identifies and adds test
2021-03-07 10:59:00 +08:00
heige bc347758e5
for Config.cacheStore store PreparedStmtDB key (#4149) 2021-03-07 10:57:22 +08:00
heige 495ec4bd87
invalid db error and value and invalid value length error (#4151) 2021-03-07 10:56:32 +08:00
Jinzhu a948c84607 Revert "Revert "Don't override the from clauses, close #4129" close #4139"
This reverts commit d6c23586ae.
2021-03-05 22:19:34 +08:00
Jinzhu d6c23586ae Revert "Don't override the from clauses, close #4129" close #4139
This reverts commit 664755270d.
2021-03-05 19:42:54 +08:00
Jinzhu 294625759c Fix after initialize db callback 2021-03-05 14:12:55 +08:00
Jinzhu 1476b2f7d4 Fix apply config 2021-03-04 20:37:44 +08:00
Sivchari adf85d5b82
change the method of initializing slice (#4097)
* change the method of initializing slice and fixed the length to be specified as 0

* keep the association.go code in the var group

* keep the association.go code in the var group

* change to initializing in var group
2021-03-04 19:44:15 +08:00
Jinzhu 664755270d Don't override the from clauses, close #4129 2021-03-04 19:16:08 +08:00
Jinzhu 90476fea7a Fix Join with slice IN, close #4133 2021-03-04 18:40:47 +08:00
Jinzhu 42999e9809 Fix overwrite preloading associations, close #4134 2021-03-04 18:28:32 +08:00
Jinzhu 0157099576 Use functional options 2021-03-04 17:40:25 +08:00
Jinzhu 3694ef4a2c Fix get current table 2021-02-26 17:30:00 +08:00
Jinzhu eb9a704fda Fix update UpdatedAt when full saving associations, close #4115 2021-02-26 17:11:25 +08:00
Jinzhu 189547f615 Fix new session with Begin, close #4120 2021-02-26 16:43:43 +08:00
Jinzhu ddeb143eb9 Lazy call registered scopes 2021-02-25 22:01:59 +08:00
Jinzhu 6b7d18656d Lazy call registered scopes 2021-02-25 20:06:26 +08:00
Jinzhu 828e6b646b Lazy call registered scopes 2021-02-25 18:49:01 +08:00