-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
when gorm not connected to any DB; the query execute result has no error #7241
Comments
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the |
When gorm.Open return an error(the second return value), the gorm.DB instance(the first return value) should never be used. |
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the |
I know i should handle the gorm.Open error. But my goal is just want to start my program as a downgrade solution even when the database cannot be connected |
The issue has been automatically marked as stale as it missing playground pull request link, which is important to help others understand your issue effectively and make sure the issue hasn't been fixed on latest master, checkout https://github.com/go-gorm/playground for details. it will be closed in 30 days if no further activity occurs. if you are asking question, please use the |
Then in your downgrade solution, you must not use the gorm.DB instance |
GORM Playground Link
https://github.sheincorp.cn/go-gorm/playground/pull/1
Description
when gorm connect to a wrong dsn config, and ignore the open error handle,
all after db exec don't have result error
I know i should handle the gorm.Open error. but i want to get my program startup when db is down.
so i tried to ignore the open error, but the db execute with no error result in some other issue.
hope db execute can result error
The text was updated successfully, but these errors were encountered: