Commit Graph

38 Commits

Author SHA1 Message Date
Jess Smith aa3fd6de13 Sort column names before generating SQL in `DB.UpdateColumns` () 2018-02-10 14:26:01 +08:00
slockij e26cb8dbc4 In some cases (Error not checked, missed data) one can perform very harmful operation - global update or delete (all records)
This is to prevent it.
2016-11-04 17:54:43 +01:00
Jinzhu 8de97c2883 Refactor Scope updatedAttrsWithValues 2016-03-09 16:45:53 +08:00
Jinzhu 3055bad1e8 scope.Fields() return slice of *Field 2016-03-07 14:25:41 +08:00
Jinzhu 2522f03c1f Set identity insert on after create transaction, close 2016-03-05 19:22:33 +08:00
Jinzhu 6bd0862811 Only update non blank fields that has been changed 2016-02-18 23:17:35 +08:00
Jinzhu c9dfd80959 Support extra options for inserting, querying, deleting, updating SQL, close , 2016-02-15 19:36:48 +08:00
Jinzhu 58a7252251 Refactor update callback 2016-01-17 19:57:03 +08:00
Jinzhu 317e1a9a48 Keep refactoring callbacks 2016-01-17 16:28:32 +08:00
Jinzhu 31366f388f Remove uncessary method CallMethodWithErrorCheck for Scope 2016-01-17 16:14:14 +08:00
Jinzhu de73d30503 Refactor callbacks 2016-01-17 15:30:42 +08:00
Jinzhu 8e2aaa92c9 Rename Callbacks to Callback 2016-01-16 21:55:00 +08:00
Jinzhu f1237e4fe9 Refactor Callback 2016-01-16 21:46:57 +08:00
Jinzhu 2a46856d52 Fix update fields having default with empty value 2015-09-14 23:41:14 +08:00
Jinzhu a29230c86f multpile foreign keys 2015-07-30 16:23:51 +08:00
Jinzhu 1eb1ed091f Test ManyToMany relations with multi primary keys 2015-04-10 16:55:53 +08:00
Jinzhu 2989e42d4d Support UpdateColumn with Select and Omit 2015-03-13 11:01:05 +08:00
Jinzhu 187eae8d9c Update with Select and Omit 2015-03-12 18:30:59 +08:00
Jinzhu 83ee11e184 Don't call callbacks if has error 2015-02-24 16:28:15 +08:00
Jinzhu 5c478b46e1 Use Common Initialisms from golint 2015-02-18 10:36:32 +08:00
Jinzhu 0b32041135 Review and Refactor 2015-02-17 22:55:14 +08:00
Jinzhu 75819b2bb3 Refactor DefaultValue 2014-11-17 17:38:32 +08:00
Paolo Galeone 064d91335b Add default values support ( https://github.com/jinzhu/gorm/issues/251 ) 2014-11-15 18:32:35 +01:00
Jinzhu 953c347ba7 Refactor Scope 2014-09-02 19:03:01 +08:00
Jinzhu 6271cf0e55 Fix tests for postgres 2014-08-30 22:39:28 +08:00
Jinzhu f984bc8515 Refact code 2014-08-30 21:42:35 +08:00
Cihangir SAVAS 4e90fbf4e8 gorm: added ability to change the time.now format 2014-08-23 01:00:04 -07:00
Jinzhu 39ac95adbb Add InstanceSet, InstanceGet fomr Scope 2014-08-20 17:05:02 +08:00
Jinzhu 0cba662be0 Add method QuotedTableName for Scope 2014-06-03 17:17:30 +08:00
Jinzhu 2fff8a7fac Revert "quote table name"
This reverts commit 38a06bfdaa.
2014-06-03 17:16:34 +08:00
Jinzhu 38a06bfdaa quote table name 2014-05-24 09:54:17 +08:00
unknown dfb75dc79d Fixed double logging of UPDATE and DELETE commands. 2014-02-19 14:51:14 -08:00
Jinzhu b713479174 change callback names 2014-01-29 10:28:20 +08:00
Jinzhu f1d990e92a rename scope.quote to scope.Quote 2014-01-28 16:22:41 +08:00
Jinzhu 048b8b6abe make update column works with new plugin system 2014-01-28 08:27:12 +08:00
Jinzhu 506d14a2f2 make callback deletes works 2014-01-27 22:36:08 +08:00
Jinzhu 23feade663 use callback update when save 2014-01-27 11:25:55 +08:00
Jinzhu 12c3df1f47 Add callback update 2014-01-26 12:46:04 +08:00