-
Notifications
You must be signed in to change notification settings - Fork 705
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
Delay initialize db object #1323
Delay initialize db object #1323
Conversation
14088ba
to
8c24fd3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!!
@@ -105,15 +105,18 @@ func flagPassed(name ...string) bool { | |||
return found | |||
} | |||
|
|||
func runStmt(stmt string, isTerminal bool, modelDir string, db *sql.DB, ds string) error { | |||
func runStmt(stmt string, isTerminal bool, modelDir string, ds string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ds -> datasource
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, will polish it in the next PR.
related PR #1318
This IR deferred initialization of
DB
object, so sqlflowserver don't need to initialize the DB object on Argo mode.