Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

sqle: change Engine constructor to accept a Config struct #287

Merged
merged 1 commit into from
Jul 16, 2018

Conversation

erizocosmico
Copy link
Contributor

Closes #285

@erizocosmico erizocosmico requested a review from ajnavarro July 12, 2018 12:15
engine.go Outdated
// New creates a new Engine with custom configuration. To create an Engine with
// the default settings use `NewDefault`.
func New(c *sql.Catalog, a *analyzer.Analyzer, cfg *Config) *Engine {
var versionPostfix = "go-mysql-server"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we just do not register the "VERSION()" function if that config property is empty? Or maybe just return the MySQL version and that's it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That way, NewDefault will always return just the MySQL version

@erizocosmico erizocosmico force-pushed the feature/engine-constructor branch from 8b341f0 to 591d496 Compare July 12, 2018 12:56
@erizocosmico
Copy link
Contributor Author

Done @ajnavarro

@ajnavarro
Copy link
Contributor

Fix broken test and LGTM.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@erizocosmico erizocosmico force-pushed the feature/engine-constructor branch from 591d496 to 2abbea9 Compare July 16, 2018 10:02
@erizocosmico
Copy link
Contributor Author

Should be fixed now

@ajnavarro ajnavarro merged commit a2b3539 into src-d:master Jul 16, 2018
@erizocosmico erizocosmico deleted the feature/engine-constructor branch July 16, 2018 12:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants