forked from go-gorm/gorm
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch to latest #31
Merged
Merged
Fetch to latest #31
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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](go-gorm/sqlite@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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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](go-gorm/postgres@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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Allow the sql stmt terminator ";" at the end of a named parameter. Example: select * from table_name where name == @name;
* fix: QuoteTo not fully support raw mode * fix: table alias without AS * test: clause.Column/Table quote test * fix: revert table alias quote
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](go-gorm/postgres@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] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fixed belongs_to & has_one reversed if field same * hasmany same foreign key bug fixed and test added * belongsToSameForeignKey fixed and reverted old fix
…tag (#4738) * fix:update miss where condition * fix:rename test case
* fixed:create nil pointer * fixed:panic when create value from nil struct pointer.
Makes it the default behavior to convert SQL null values to zero values for model fields which are not pointers.
…h are not pointers #4710
fix: automigrate error caused by indexes while using dynamic table name
* Refactor ParseWithSchemaTable method and improve test. * Fix schema.ParseWithSchemaTable method for only use schemaTable in migrator and improve test. * Rename `schemaTable` to `specialTableName` for clearly argument.
* fix: Save not use soft_delete * fix: save not use soft_delete * fix: save not use soft_delete * fix: save not use soft_delete Co-authored-by: kinggo <>
* fix type alias AutoMigrate bug. eg ```go package main type IDer interface{ GetID() int64 } // ID will add some method to implement some interface eg: GetID type ID int64 func (z ID) GetID() int64 { return int64(z) } type Test struct { ID Code string `gorm:"size:50"` Name string `gorm:"size:50"` } func main() { db, err := gorm.Open(postgres.New(postgres.Config{ DSN: `dsn`, PreferSimpleProtocol: false, }), &gorm.Config{ Logger: logger.Default.LogMode(logger.Info), SkipDefaultTransaction: true, }) if err != nil { log.Fatal(err) } if err = db.AutoMigrate(&Test{}); err != nil { // invalid embedded struct for Test's field ID, should be struct, but got main.ID log.Fatal(err) } } ``` * fix type alias AutoMigrate bug. eg ```go package main type IDer interface{ GetID() int64 } // ID will add some method to implement some interface eg: GetID type ID int64 func (z ID) GetID() int64 { return int64(z) } type Test struct { ID Code string `gorm:"size:50"` Name string `gorm:"size:50"` } func main() { db, err := gorm.Open(postgres.New(postgres.Config{ DSN: `dsn`, PreferSimpleProtocol: false, }), &gorm.Config{ Logger: logger.Default.LogMode(logger.Info), SkipDefaultTransaction: true, }) if err != nil { log.Fatal(err) } if err = db.AutoMigrate(&Test{}); err != nil { // invalid embedded struct for Test's field ID, should be struct, but got main.ID log.Fatal(err) } } ``` * Add typealis test. * try to fix golangci-lint
* modify unscoped judge * modify unscoped judge Co-authored-by: liweiting <[email protected]>
* fix: generate sql incorrect when use soft_delete and only one OR
improve the error handle in tests_test
* time.Time, []byte type add alias support * reformat
…4987) Bumps [gorm.io/driver/mysql](https://github.com/go-gorm/mysql) from 1.2.1 to 1.2.3. - [Release notes](https://github.com/go-gorm/mysql/releases) - [Commits](go-gorm/mysql@v1.2.1...v1.2.3) --- updated-dependencies: - dependency-name: gorm.io/driver/mysql dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ningfei <[email protected]>
Added two comments to describe FirstOrInit and FirstOrCreate methods.
* fix: replace empty name result in panic * fix: replace empty table name result in panic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.