-
Notifications
You must be signed in to change notification settings - Fork 99
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
Initial implementation. #2
Conversation
Add `lib/connector.js` and `lib/sql.js` from loopbackio/loopback-datasource-juggler@5937f0c. Export both classes from `index.js` Rename `BaseSQL` to `SqlConnector`. Fix jshint errors.
Jenkins approves, but this PR existed before the job was added so it tested the branch directly instead of the PR: http://ci.strongloop.com/job/loopback-connector/1/ |
All is well |
My comment caught CI's attention. @bajtos there should be a stub test at least: var assert = require('assert');
var connector = require('../');
assert(connector.Connector);
assert(connector.SqlConnector); |
FYI, none of the downstream jobs will be able to make use of this module in CI until this PR is merged into master, unless they have the same branch name. |
All is well |
Obviously the code is inherited from juggler, so thats not really the point of this review. My only concern is the lack of tests. Are there really none to port from juggler? I think this is fine for now, but we should improve the tests. |
I did not find any. If you or Raymond can point me to some then I am happy to port them. On the other hand, I am not sure what's the best way to test SqlConnector, since it's a base class to be inherited from. We can write a SQL connector in the test and run it agains a real SQL DB, but that seems like a duplication of other connectors. Or we can mock
Agreed. Can we leave writing new tests for another day and another pull request? |
LGTM |
At some point, I would like to add a connector for https://github.com/mapbox/node-sqlite3. It can provide a SQL based reference implementation using in-memory or file system store. |
Great idea. I suppose strongloop/loopback issues is the best place for tracking feature requests like this? |
Add
lib/connector.js
andlib/sql.js
fromloopbackio/loopback-datasource-juggler@5937f0c.
Export both classes from
index.js
Rename
BaseSQL
toSqlConnector
.Fix jshint errors.
/to @raymondfeng @ritch please review
strongloop/loopback#275