Commit Graph

2521 Commits

Author SHA1 Message Date
Jinzhu 60d1e68567 Update github action CI 2020-06-22 22:37:14 +08:00
Jinzhu 59d7150917 Update README 2020-06-22 20:22:15 +08:00
Jinzhu 5d044642d1 Allow DisableForeignKeyConstraintWhenMigrating 2020-06-22 11:04:44 +08:00
Jinzhu 7851faa094 Allow close prepared statements, double check before prepare 2020-06-21 18:18:23 +08:00
Jinzhu d0764bead1 Test migrate with comment and check created constraints 2020-06-21 13:59:43 +08:00
Jinzhu fee1e4aafd Fix create foreign keys for many2many relations 2020-06-21 10:48:23 +08:00
Jinzhu 5883490aa7 Select, Omit, Preload supports clause.Associations 2020-06-20 17:21:01 +08:00
Jinzhu a1e35bdc94 Support merge batch data some having primary values 2020-06-20 16:52:15 +08:00
Jinzhu 3d8f6f9cf9 Test GroupConditions 2020-06-20 01:55:30 +08:00
Jinzhu 4f19e2a7b3 Test ForeignKeyConstraints 2020-06-20 01:20:18 +08:00
Jinzhu d4d339f3b5 Handle data type cases 2020-06-19 22:51:46 +08:00
Jinzhu e3292b3b41 Test with latest driver vesion 2020-06-19 18:44:19 +08:00
Jinzhu 7dc255acfe Add SavePoint/RollbackTo/NestedTransaction 2020-06-19 18:30:04 +08:00
Jinzhu 2c1b04a2cf Fix failed to create second record in same transaction, close #3060 2020-06-19 12:38:03 +08:00
Jinzhu 07960fe661 Fix []byte support 2020-06-18 11:24:08 +08:00
Jinzhu 96368eb967 Test embedded struct implements Scan & Value interface 2020-06-18 09:15:23 +08:00
Jinzhu 6b2f37189e Fix few cases with postgres 2020-06-18 08:40:41 +08:00
mojotv ca2c80c8e3
add githubAction CI for tests (#3057) 2020-06-17 20:29:37 +08:00
Jinzhu e487f355a0 Add DB method 2020-06-17 19:57:54 +08:00
2BFL d716e456f4
fix broken url (#3053) 2020-06-15 12:28:35 +08:00
Jinzhu 9039e36cfc Allow scan into float close #1373 2020-06-14 19:18:48 +08:00
Jinzhu 1fdc66710e Add table options 2020-06-14 19:13:16 +08:00
Jinzhu 56bdded0f8 Fix statement modifier support 2020-06-14 12:18:46 +08:00
maiyama18 1bbaa43951
fix typos in test method names (#3052) 2020-06-14 09:24:07 +08:00
Razon Yang 537065fbd9
Replace godoc badge with pkg.go.dev (#3051) 2020-06-12 20:00:55 +08:00
Jinzhu 1af325ab4f Upgrade sqlserver driver 2020-06-10 16:06:54 +08:00
Jinzhu 45cb6b49bf Add FindInBatches support 2020-06-10 15:36:34 +08:00
Jinzhu dbc3f8feb0 Add count soft deleted record test 2020-06-10 13:42:39 +08:00
Jinzhu 0d58d5a3a7 Upsert selected columns 2020-06-10 10:48:48 +08:00
Jinzhu f3424c6864 Support save slice of data 2020-06-10 00:02:14 +08:00
Jinzhu 22ff8377df Fix Pluck with Table only 2020-06-09 15:36:10 +08:00
Jinzhu 05e6a65ee1 Fix typo 2020-06-09 12:00:43 +08:00
Jinzhu a42f9bf439 Remove codecov as doesn't support detect code-coverage of separated folders 2020-06-09 11:00:50 +08:00
Jinzhu c4872cddfd Refactor callbacks 2020-06-09 10:17:24 +08:00
Jinzhu 649d02fddd Add batch upsert tests 2020-06-09 09:04:32 +08:00
Jinzhu f0b6bd9ee0 Fix typo 2020-06-08 23:25:16 +08:00
Jinzhu 4555796b62 Refactor Execute callbacks 2020-06-08 22:32:35 +08:00
Jinzhu 9f19378304 Grow SQL capacity to reduce allocation 2020-06-08 20:23:47 +08:00
Jinzhu aaf0725771 Refactor for performance 2020-06-08 17:21:26 +08:00
Douglas Danger Manley 13f96f7a15
Spelling fix for "condtion" -> "condition" (#3042)
This fixes a spelling error in the word "condition"; in particular,
the `BuildCondtion` function should be named `BuildCondition`.
2020-06-08 11:38:51 +08:00
Jinzhu 8f8d549ca3 Refactor merge where exprs 2020-06-08 09:13:34 +08:00
Douglas Danger Manley 72d0fa6196 Fix Statement Where clone array corruption in v2
Method-chaining in gorm is predicated on a `Clause`'s `MergeClause`
method ensuring that the two clauses are disconnected in terms of
pointers (at least in the Wherec case).

However, the original Where implementation used `append`, which
only returns a new instance if the backing array needs to be resized.
In some cases, this is true.  Practically, go doubles the size of the
slice once it gets full, so the following slice `append` calls would
result in a new slice:

* 0 -> 1
* 1 -> 2
* 2 -> 4
* 4 -> 8
* and so on.

So, when the number of "where" conditions was 0, 1, 2, or 4, method-chaining
would work as expected.  However, when it was 3, 5, 6, or 7, modifying the
copy would modify the original.

This also updates the "order by", "group by" and "set" clauses.
2020-06-07 16:54:01 -04:00
Jinzhu e7b2e92ce3 Remove RecordNotFound method 2020-06-07 22:03:45 +08:00
Jinzhu 31a0553b82 Fix FileWithLineNum on windows 2020-06-07 18:37:05 +08:00
Jinzhu d11c424334 Fix typo 2020-06-07 15:26:43 +08:00
Jinzhu 4a4b8234de Update issues template 2020-06-07 13:16:09 +08:00
Jinzhu 82d55b1054 Add OnConflict DoUpdates test 2020-06-07 12:50:00 +08:00
Jinzhu 93043334c3
Create FUNDING.yml 2020-06-07 12:47:26 +08:00
Jinzhu 6937d713c3 Refactor clauses 2020-06-06 22:52:08 +08:00
Jinzhu 38d1cd2bf1 Replace For with Locking 2020-06-06 21:35:28 +08:00