Commit Graph

102 Commits

Author SHA1 Message Date
heyanfu 363f9b7863
golint standard (#4421) 2021-05-31 10:08:06 +08:00
Jinzhu ea1bce3771 Only check struct value can address or not 2021-05-23 11:21:56 +08:00
Jinzhu 6951be0284 Allow customize clauses 2021-04-28 17:19:30 +08:00
Jinzhu d327926425 Check ReflectValue.CanAddr before set field value 2021-04-19 21:37:38 +08:00
Chris Faulkner 15a46bc042
Fix some typos (#4294) 2021-04-19 21:03:39 +08:00
heige 74e7a9ca07
Optimize reflect value length and method (#4280)
* Respect ignore migration when add column (#4276)

continue https://github.com/go-gorm/gorm/pull/4028

* feat: Optimal value type acquisition for v (#4278)

* feat: optimize relect value length and value

* feat: optimize ConvertSliceOfMapToValuesForCreate method

Co-authored-by: yrong1997 <yrong1997@gmail.com>
2021-04-14 13:00:54 +08:00
Jinzhu a3d9bbfc36 build *clause.Expr 2021-03-19 13:21:43 +08:00
Jinzhu 9fccb17d07 Fix double pointer for where conditions, close #4159 2021-03-10 19:46:59 +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
Jinzhu ddeb143eb9 Lazy call registered scopes 2021-02-25 22:01:59 +08:00
Jinzhu 828e6b646b Lazy call registered scopes 2021-02-25 18:49:01 +08:00
Jinzhu 79225bfe48 Fix Omit/Select without Model value, close #4098 2021-02-18 10:53:29 +08:00
Jinzhu 84ea3ec0cc Fix sub query argument order with multiple raw SQL 2021-02-09 19:56:45 +08:00
Jinzhu df24821896 Fix SubQuery for raw sql 2021-02-09 17:05:50 +08:00
Jinzhu 35ebfe6874 Support group conditions with single OR condition 2021-01-20 18:24:05 +08:00
Jinzhu 53b3ebdd1d Add invalid data error when building conditions 2021-01-05 21:01:16 +08:00
Jinzhu 00a785cd68 Don't use invalid value to build conditions, close #3912 2021-01-05 18:01:51 +08:00
Jinzhu 1b8cb07cf2 Allow Where select fields when searching with struct 2020-12-30 18:13:52 +08:00
Jinzhu 6848ae872f Fix gorm.Expr with SubQuery, fix #3857 2020-12-15 15:50:35 +08:00
Jinzhu 14a0976dd4 populate the DeletedAt field when soft delete, fix #3855 2020-12-15 10:39:20 +08:00
Jinzhu f655041908 Allow overwrite ignored field's permission, close #3829 2020-12-06 11:07:05 +08:00
Jinzhu 9df9f7688b Change UpdatingColumn to SkipHooks 2020-11-17 17:49:43 +08:00
Jinzhu 26504f5cae Use NewDB to replace WithConditions for Session 2020-11-17 16:28:37 +08:00
Jinzhu 1e241aa645 Reduce GC alloc 2020-11-10 21:23:20 +08:00
Jinzhu 4009ec5816 Fix call hook methods when updating with struct 2020-10-27 18:14:36 +08:00
Jinzhu d011ebe7af Fix clone statement for Unscoped, UpdatingColumn, close #3681 2020-10-26 10:17:25 +08:00
Jinzhu 5228735915 Don't build IN condition if value implemented Valuer interface, #3517 2020-09-24 15:00:13 +08:00
Jinzhu f6117b7f3d Should not diplay SubQuery SQL log, close #3437 2020-09-09 16:26:16 +08:00
Jinzhu 3cd81ff646 Fix query with specified table and conditions, close #3382 2020-09-03 18:42:32 +08:00
Jinzhu 677edf9d9e ignore AS when alias table as it doesn't work on oracle db, close #3328 2020-08-29 22:09:07 +08:00
Jinzhu ce8853e7a6 Add GormValuer interface support 2020-08-27 15:03:57 +08:00
Jinzhu cc6a64adfb Support smart migrate, close #3078 2020-08-23 18:16:12 +08:00
Jinzhu 3a97639880 Fix unordered joins, close #3267 2020-08-23 10:45:10 +08:00
Jinzhu 2c4e857125 Should ignore association conditions when querying with struct 2020-08-13 18:09:04 +08:00
Jinzhu dea93edb6a Copy TableExpr when clone statement 2020-08-13 16:28:21 +08:00
Qt f4cfa9411b
define err with the same code style (#3199) 2020-07-26 10:03:58 +08:00
Jinzhu 69d8111893 Fix panic when using invalid data, close #3193 2020-07-24 08:32:50 +08:00
Jinzhu 90183fadde Allow advanced table with args 2020-07-19 21:30:24 +08:00
Jinzhu de764d9e3d Replace FullTable with TableExpr 2020-07-17 21:19:21 +08:00
Jinzhu e77156980c Fix panic when using Select/Omit Associations with no schema, close #3160 2020-07-17 15:50:17 +08:00
Jinzhu 4456df7a5d Lint with golangci-lint 2020-07-16 11:27:12 +08:00
Jinzhu d4b462a351 Fix alias keyword with Table, close #3104 2020-07-10 21:11:28 +08:00
Jinzhu bba569af2b Add NamedArg support 2020-07-10 12:28:24 +08:00
Jinzhu 2ae0653af2 Fix ambiguous column when using same column name in join table, close #3120 2020-07-09 09:03:48 +08:00
Jinzhu 4e066c9590 Test Or 2020-07-05 12:23:45 +08:00
Jinzhu 1a2fabb34d Test Not 2020-07-05 11:56:12 +08:00
Jinzhu 929c0c576c Test Hooks For Slice 2020-06-30 22:47:21 +08:00
Jinzhu f5566288de Add SetColumn, Changed method 2020-06-30 16:53:54 +08:00
Jinzhu 9bfe306975 Only query with readable fields 2020-06-27 08:04:12 +08:00
Jinzhu 3d8f6f9cf9 Test GroupConditions 2020-06-20 01:55:30 +08:00