Commit Graph

2557 Commits

Author SHA1 Message Date
kinggo ec58e3319f
fixed:panic when create value from nil struct pointer. (#4771)
* fixed:create nil pointer

* fixed:panic when create value from nil struct pointer.
2021-10-12 21:19:08 +08:00
kinggo 418c60c83c
fixed: clauseSelect.Columns missed when use Join And execute multiple query. (#4757) 2021-10-09 16:55:45 +08:00
Jinzhu bfda75d099 Support specify select/omit columns with table 2021-10-09 10:42:41 +08:00
Jinzhu 6312d86c54 Support specify select/omit columns with table 2021-10-08 17:51:27 +08:00
Jinzhu d4c838c1ce Upgrade sqlite driver 2021-10-08 17:31:58 +08:00
kinggo b46e2afc4a
fix : update miss where's condition when primary key use "<-:create" tag (#4738)
* fix:update miss where condition

* fix:rename test case
2021-10-08 13:47:01 +08:00
heige e3fc49a694
feat: ajust PreparedStmtDB unlock location and BuildCondition if logic (#4681) 2021-10-08 11:16:58 +08:00
heige c13f3011f9
feat: adjust SetupJoinTable func if..else code (#4680) 2021-10-08 11:05:50 +08:00
Paras Waykole 5d91ddac8c
fixed belongs_to & has_one reversed if field same (proper fix) (#4694)
* fixed belongs_to & has_one reversed if field same

* hasmany same foreign key bug fixed and test added

* belongsToSameForeignKey fixed and reverted old fix
2021-10-08 10:59:55 +08:00
dependabot[bot] 57d927d046
Bump gorm.io/driver/postgres from 1.1.1 to 1.1.2 in /tests (#4740)
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/go-gorm/postgres/releases)
- [Commits](https://github.com/go-gorm/postgres/compare/v1.1.1...v1.1.2)

---
updated-dependencies:
- dependency-name: gorm.io/driver/postgres
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-08 10:54:50 +08:00
s-takehana 0b6bd33934
Update `tests.yml` (#4741) 2021-10-08 10:51:53 +08:00
River 851fea0221
fix: QuoteTo not fully support raw mode (#4735)
* fix: QuoteTo not fully support raw mode

* fix: table alias without AS

* test: clause.Column/Table quote test

* fix: revert table alias quote
2021-09-29 14:02:35 +08:00
Jinzhu c4a2e891da Fix Join condition with DB 2021-09-28 22:37:15 +08:00
Jinzhu 002bf78ea7 Fix Join condition with DB, close #4719 2021-09-28 21:43:31 +08:00
kinggo 6864a24150
fix:remove the tableName judgment in pluck (#4731) 2021-09-27 22:11:29 +08:00
Jim 5202529ea1
fix (clause/expression): Allow sql stmt terminator (#4693)
Allow the sql stmt terminator ";" at the end of a named parameter.

Example: select * from table_name where name == @name;
2021-09-20 21:40:48 +08:00
dependabot[bot] 199c8529b6
Bump gorm.io/driver/postgres from 1.1.0 to 1.1.1 in /tests (#4699)
Bumps [gorm.io/driver/postgres](https://github.com/go-gorm/postgres) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/go-gorm/postgres/releases)
- [Commits](https://github.com/go-gorm/postgres/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: gorm.io/driver/postgres
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-20 21:33:38 +08:00
dependabot[bot] d67120a155
Bump gorm.io/driver/sqlite from 1.1.4 to 1.1.5 in /tests (#4701)
Bumps [gorm.io/driver/sqlite](https://github.com/go-gorm/sqlite) from 1.1.4 to 1.1.5.
- [Release notes](https://github.com/go-gorm/sqlite/releases)
- [Commits](https://github.com/go-gorm/sqlite/compare/v1.1.4...v1.1.5)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-20 21:25:29 +08:00
Jinzhu ab355336cb Fix scan with interface 2021-09-17 18:35:14 +08:00
Jinzhu da16a8aac6 Update updated_at when upserting with Create OnConflict 2021-09-17 15:29:49 +08:00
Jinzhu 12bbde89e6 Fix Scan with interface 2021-09-17 14:04:19 +08:00
Jinzhu 61b018cb94 Fix count with selected * 2021-09-16 11:17:54 +08:00
Jinzhu d41fb3acdc Refactor dummy driver QuoteTo method 2021-09-11 16:22:35 +08:00
Jinzhu 04f049c1da Add tests for RowsAffected 2021-09-09 11:22:55 +08:00
Jinzhu a16db07945 Refactor Join ON 2021-09-07 21:21:44 +08:00
Jinzhu ba16b2368f
Refactor update record (#4679) 2021-09-07 20:04:54 +08:00
Jinzhu 6c94b07e98 try to fix fatal error: concurrent map read and map write 2021-09-07 15:30:14 +08:00
Jinzhu 3b6a7c8aec Update sqlserver driver 2021-09-07 12:01:19 +08:00
Adrien Carreira d047f854e6 PR Comments 2021-09-06 20:13:20 +08:00
Adrien Carreira c301aeb524 Refactor for readability 2021-09-06 20:13:20 +08:00
Adrien Carreira 52cc438d07 JoinsOn unit test + use all primary keys 2021-09-06 20:13:20 +08:00
Adrien Carreira 895c1178a0 Proposal, Add Specific on for Joins queries 2021-09-06 20:13:20 +08:00
riverchu eaa63d15e7 feat: copy dest fields to model struct 2021-09-06 20:13:20 +08:00
riverchu 4581e8b590 test: update Save test 2021-09-06 20:13:20 +08:00
riverchu c898622791 test: add testcase in TestSave 2021-09-06 20:13:20 +08:00
riverchu 1d9e563023 style: prepose error judgement 2021-09-06 20:13:20 +08:00
dependabot[bot] a89d4d8fd5
Bump github.com/lib/pq from 1.10.2 to 1.10.3 in /tests (#4676)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.10.2...v1.10.3)

---
updated-dependencies:
- dependency-name: github.com/lib/pq
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-06 16:26:14 +08:00
dependabot[bot] 5f019f74bf
Bump gorm.io/gorm from 1.21.13 to 1.21.14 in /tests (#4655)
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.21.13 to 1.21.14.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.21.13...v1.21.14)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-03 17:47:50 +08:00
jxlwqq 15188cf409
Add Go 1.17 (#4666) 2021-09-03 17:47:32 +08:00
Jinzhu 3a8c250180 Refactor calc associations onConflictOption 2021-08-26 13:37:49 +08:00
zkqiang 74746211b8 Test update association with non-updatable 2021-08-26 13:37:49 +08:00
zkqiang e81833fd11 Fix onConflict with non-updatable in associations 2021-08-26 13:37:49 +08:00
Jinzhu f21e35f7c5 Fix table not supported error when using unexpected table name 2021-08-26 13:14:16 +08:00
dependabot[bot] 0934b10856
Bump gorm.io/driver/sqlserver from 1.0.7 to 1.0.8 in /tests (#4631)
Bumps [gorm.io/driver/sqlserver](https://github.com/go-gorm/sqlserver) from 1.0.7 to 1.0.8.
- [Release notes](https://github.com/go-gorm/sqlserver/releases)
- [Commits](https://github.com/go-gorm/sqlserver/compare/v1.0.7...v1.0.8)

---
updated-dependencies:
- dependency-name: gorm.io/driver/sqlserver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-23 15:30:02 +08:00
Sec Cake 093694fbf2
Fix extra 'AND' when len(values) == 0 ON IN.NegationBuild() (#4618) 2021-08-20 18:06:48 +08:00
dependabot[bot] 7a53d8e46b
Bump gorm.io/driver/mysql from 1.1.1 to 1.1.2 in /tests (#4615)
Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/go-gorm/mysql/releases)
- [Commits](https://github.com/go-gorm/mysql/compare/v1.1.1...v1.1.2)

---
updated-dependencies:
- dependency-name: gorm.io/driver/mysql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-20 17:52:56 +08:00
dependabot[bot] e076e9e0fb
Bump gorm.io/gorm from 1.21.12 to 1.21.13 in /tests (#4616)
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.21.12 to 1.21.13.
- [Release notes](https://github.com/go-gorm/gorm/releases)
- [Commits](https://github.com/go-gorm/gorm/compare/v1.21.12...v1.21.13)

---
updated-dependencies:
- dependency-name: gorm.io/gorm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-20 17:52:48 +08:00
River 1bb0d8732d
feat: count accpet `db`.`table` (#4626)
* feat: count accpet `db`.`table`

* fix: logic fix
2021-08-20 17:37:21 +08:00
River 25f561a742
feat: QuoteTo accept clause.Expr (#4621)
* feat: QuoteTo accept clause.Expr

* test: update Expr build test
2021-08-19 14:33:18 +08:00
Jinzhu 2b2f6e77af Add SchemaName to NamingStrategy 2021-08-11 16:20:29 +08:00