Skip to content
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

Remove peer dependency on datasource-juggler #28

Merged
merged 1 commit into from
Jun 4, 2014

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented May 23, 2014

Use SqlConnector from loopback-connector as the base class for the
MySQL connector.

Use dataSource.modelBuilder instead of juggler.ModelBuilder to
access the function for registering new schema type.

Note: the behaviour remains backwards compatible, the connector can be
used with both old 1.x and upcoming 2.x versions of
loopback-datasource-juggler.

Requires loopbackio/loopback-connector#2.

/to @raymondfeng @ritch please review

strongloop/loopback#275

@slnode
Copy link

slnode commented May 23, 2014

Test Failed. To trigger a build add comment - ".test\W+please"
Refer to this link for build results: http://ci.strongloop.com/job/loopback-connector-mysql/311/

@bajtos
Copy link
Member Author

bajtos commented May 23, 2014

The build if failing because loopback-connector does not have a CI job yet and is not published to npmjs.org.

/cc @rmg

@rmg
Copy link
Contributor

rmg commented May 23, 2014

test please

@slnode
Copy link

slnode commented May 23, 2014

All is well
Refer to this link for build results: http://ci.strongloop.com/job/loopback-connector-mysql/312/

// loopback-datasource-juggler 1.x
modelBuilder.constructor.registerType.bind(modelBuilder.constructor);

defineType(function Point() {
Copy link

Choose a reason for hiding this comment

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

This looks suspicious.

@ritch
Copy link

ritch commented May 28, 2014

Not sure why we are defining an empty Point type... Otherwise LGTM.

@bajtos
Copy link
Member Author

bajtos commented May 29, 2014

Not sure why we are defining an empty Point type... Otherwise LGTM.

I assume Point is the MySQL type used to store geo points, see e.g. this stackoverflow answer.

Perhaps @raymondfeng can provide more details?

@raymondfeng
Copy link
Contributor

The Point type is inherited from jugglingdb mysql adapter. Now we have GeoPoint. The Point type is not used. We can remove it at some point.

Use `SqlConnector` from loopback-connector as the base class for the
MySQL connector.

Use `dataSource.modelBuilder` instead of `juggler.ModelBuilder` to
access the function for registering new schema type.

Note: the behaviour remains backwards compatible, the connector can be
used with both old 1.x and upcoming 2.x versions of
loopback-datasource-juggler.
@bajtos
Copy link
Member Author

bajtos commented Jun 3, 2014

Added a comment explaining where is Point coming from.
Modified loopback-connector version spec to "1.x" instead of "^1.0.0".

bajtos added a commit that referenced this pull request Jun 4, 2014
Remove peer dependency on datasource-juggler
@bajtos bajtos merged commit e157883 into master Jun 4, 2014
@bajtos bajtos deleted the feature/refactor-connector-base branch June 4, 2014 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants