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

Alias find as findById #407

Merged
merged 1 commit into from
Jan 12, 2018
Merged

Alias find as findById #407

merged 1 commit into from
Jan 12, 2018

Conversation

jannyHou
Copy link
Contributor

@jannyHou jannyHou commented Jan 11, 2018

Description

Some connectors call the function that finds instance by id as findonly but some call it as findById only, I am unifying them as findById across all connectors.

Related issues

loopbackio/loopback-datasource-juggler#1459

Checklist

  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style
    guide

@jannyHou
Copy link
Contributor Author

@slnode test please

Copy link
Member

@bajtos bajtos left a comment

Choose a reason for hiding this comment

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

Nice 👍

// License text available at https://opensource.org/licenses/MIT

// This test written in mocha+should.js
var should = require('./init.js');
Copy link
Member

Choose a reason for hiding this comment

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

Please use const, see http://loopback.io/doc/en/contrib/style-guide.html#variable-declarations

(According to package.json, we support only Node.js 4.x and newer, therefore const is allowed.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I addressed the feedback but causes eslint failure, its version is too old in this repo and a upgrading causes 100+failures and could not be fixed by running a --fix command, so I reverted the change and opened an issue for eslint upgrade:
#408
I am extremely willing to dig more but don't get too much time for it due to the interrupt issue and my lb-next process is too behind, will get back to it when everything's on the right track. Sorry for that.

var should = require('./init.js');

describe('connector function - findById', function() {
var db, TestAlias, sampleId;
Copy link
Member

Choose a reason for hiding this comment

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

Use let, not var.

@jannyHou jannyHou merged commit ec7c721 into master Jan 12, 2018
@jannyHou jannyHou deleted the feat/alias-findById branch January 12, 2018 19:33
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.

3 participants