Commit Graph

2552 Commits

Author SHA1 Message Date
heige 9e5a4e30b4
Fix migrator GuessConstraintAndTable method for return value for *schema.Check (#4527) 2021-08-03 11:40:57 +08:00
heige 413fe587c6
Optimize migrator.go MigrateColumn and ColumnTypes func. (#4532) 2021-08-02 18:44:10 +08:00
daheige 7a49629fd1 optimize Parse func for fieldValue.Interface 2021-07-28 19:00:34 +08:00
daheige 41ac73b6a1 update comment for ConvertSliceOfMapToValuesForCreate func 2021-07-28 18:56:39 +08:00
Jason Lee 3e15478534
Merge pull request #4530 from daheige/optimize-setupValuerAndSetter
optimize setupValuerAndSetter func
2021-07-28 18:51:09 +08:00
heige 5115813c50
Fix preload fmt.Errorf formatter (#4531) 2021-07-28 18:50:08 +08:00
s-takehana 2202e99cbf
Fix create index with comments in MySQL (#4521)
* Fix create index with comments in MySQL

* Fix tests
2021-07-18 11:47:44 +08:00
daheige a70254609d optimize setupValuerAndSetter func 2021-07-14 22:03:17 +08:00
Jinzhu 74752018dc Fix hang when closing a prepared statement 2021-07-14 18:35:10 +08:00
River ac97aec513
New Comma Expression (#4524)
* Add new comma expression

* Add comma expression unit test
2021-07-14 15:51:24 +08:00
Jinzhu d4f3c109d6 Fix OnConflict with one column, close #4370 2021-07-13 21:29:31 +08:00
Jinzhu 83530ec659 Fix delete order by clause when counting, close #4478 2021-07-13 21:17:43 +08:00
Jinzhu 52b72d7ef2 Add error explanations when preloading assocations w/o foreign fields, close #4356 2021-07-13 21:00:13 +08:00
Jinzhu b13732c450 Fix invalid preload SQL when no data found, close #4443 2021-07-13 20:23:05 +08:00
Jinzhu c73fe96cfd Fix scan into decimal.Decimal, close #4457 2021-07-13 19:59:31 +08:00
Jinzhu b616d810eb Fix scan single value to custom type, close #4501 2021-07-13 19:29:10 +08:00
Jinzhu 76cd73cb82 Fix wipes out MySQL global variables from the query, close #4515 2021-07-13 18:48:43 +08:00
Jinzhu 2ec7043818 Respect update permission for OnConflict Create 2021-07-13 18:04:42 +08:00
Burak Demirpolat 0329b800b0
slightly better callback warning (#4495) 2021-07-13 16:38:44 +08:00
wangyuehong 80497f27a6
title foreign schema for many2many to avoid panic (#4496)
Co-authored-by: yuehong.wang <yuehong.wang@dena.jp>
2021-07-13 16:36:22 +08:00
shiyu7 16579e00c6
fix: fix race issue in prepare method (#4487) 2021-07-01 06:27:12 +08:00
Jason Lee 6d64e31965
Merge pull request #4479 from wuwenchi/master
Fix document for Pluck's usage #4473
2021-06-27 11:29:20 +08:00
wuwenchi 8bd8d38fe9 Fix Pluck's usage #4473 2021-06-26 21:23:16 +08:00
Jinzhu 8e67a08774 Fix Scopes with Row, close #4465 2021-06-18 15:38:20 +08:00
Jinzhu 3226937f68 Fix calc gormSourceDir, close #4456 2021-06-13 10:32:03 +08:00
kalle (jag) 25b9f2e26a
Added return names to logger.Interface.Trace (#4450) 2021-06-11 21:51:40 +08:00
Tony a0bddccfe1
Use count(*) instead of count(1) include NULL and non-NULL rows(SQL-92). (#4453) 2021-06-11 21:51:18 +08:00
Jinzhu 5b65b02805 Update tests go.mod 2021-06-11 16:00:26 +08:00
Jinzhu e425ed6f6a Update tests go.mod 2021-06-10 20:26:21 +08:00
heige 50e85e14d4
Code optimize (#4415)
* optimize gormSourceDir replace

* fmt.Errorf adjust and Optimize for-break

* strings trim

* feat: avoid using the same name field and if..else optimization adjustment

* optimization callbacks/create.go Create func if...else logic

* fix: callbacks/create.go Create func

* fix FileWithLineNum func and add gormSourceDir unit test

* remove debug print and utils_filenum_test.go
2021-06-10 10:21:28 +08:00
liamrfell 00b252559f
Fix: FirstOrCreate slice out of bounds error when using 'Assigns' (#4436)
Co-authored-by: Liam Fell <liam@lot.to>
2021-06-07 10:39:24 +08:00
Vitaliy Shein dd8bf88eb9
add Target where clause for on conflict (#4442)
Co-authored-by: Vitaliy Shein <vitaliy.shein@thebricks.com>
2021-06-07 10:39:00 +08:00
s-takehana cf079b8b7d
Update version in `tests.yml` (#4432) 2021-06-02 09:58:22 +08:00
Jinzhu 810058cd55 Fix soft delete with Update 2021-06-01 18:34:38 +08:00
Jinzhu 9abac96546 Fix Eq, Neq support slice of data 2021-05-31 17:21:27 +08:00
Jinzhu 14e96080d8 Eq, Neq support slice of data 2021-05-31 15:25:38 +08:00
heyanfu 363f9b7863
golint standard (#4421) 2021-05-31 10:08:06 +08:00
Ikko Ashimine bcf2b385a4
Fix typo in associations_test.go (#4407)
occured -> occurred
2021-05-27 17:40:28 +08:00
Brenda Wallace ac722c16f9
Small grammar fix in error message (#4406) 2021-05-24 10:23:34 +08:00
Jinzhu ea1bce3771 Only check struct value can address or not 2021-05-23 11:21:56 +08:00
Paras Waykole 79f427d862
fixed has_many stopped working if field names are identical (#4387)
* fixed belongs_to & has_one reversed if field same

* hasmany same foreign key bug fixed and test added
2021-05-19 16:05:29 +08:00
Atreya cf93b16730
Fix ErrInvalidTransaction error message (#4380) 2021-05-17 15:53:48 +08:00
Jinzhu 92c3ba9dcc Fix create new db sessions in scopes 2021-05-17 15:36:07 +08:00
Chen Quan a480bd8545
Update Optimize schema (#4364) 2021-05-10 09:51:50 +08:00
Jinzhu 6b7abc54a2 Fix tests 2021-05-06 13:06:31 +08:00
Jinzhu 2aca96d147 test ignore migration, close #4314, #4315 2021-05-05 08:26:48 +08:00
我的我的 3f359eab9b
slim trace if depth (#4346)
Co-authored-by: gogs <guzzsek@gmail.com>
2021-05-05 08:14:40 +08:00
Paras Waykole 8f7f3ad315
fixed belongs_to & has_one reversed if field same (#4343) 2021-05-05 07:57:54 +08:00
Jinzhu 70e93e73d8 Check data type if copyable before change reference field's type 2021-04-30 16:35:55 +08:00
Karolos Lykos f0d0bbbc10
Added missing white space (#4330)
* Added missing white space

* Added missing white space

* Added missing white space
2021-04-29 07:15:37 +08:00