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

Update loopback-datasource-juggler API docs for promises #833

Closed
davidcheung opened this issue Jan 27, 2016 · 9 comments
Closed

Update loopback-datasource-juggler API docs for promises #833

davidcheung opened this issue Jan 27, 2016 · 9 comments
Assignees

Comments

@davidcheung
Copy link
Contributor

Parent: strongloop/loopback/issues/1409
Related: strongloop/strong-docs/issues/63, strongloop-internal/scrum-loopback/issues/615

scope.js
ScopeDefinition.prototype.related
(seems lack doc page)

dao.js
Static methods:
DataAccessObject.create
DataAccessObject.updateOrCreate (alias of upsert)
DataAccessObject.upsert
DataAccessObject.findOrCreate
DataAccessObject.exists
DataAccessObject.findById
DataAccessObject.findByIds (alias of findById)
DataAccessObject.find
DataAccessObject.findOne
DataAccessObject.remove (alias of destroyAll)
DataAccessObject.deleteAll (alias of destroyAll)
DataAccessObject.destroyAll
DataAccessObject.removeById (alias of destroyById)
DataAccessObject.destroyById
DataAccessObject.deleteById (alias of destroyById)
DataAccessObject.count
DataAccessObject.update (alias of updateAll)
DataAccessObject.updateAll

Instance methods:
DataAccessObject.prototype.save
DataAccessObject.prototype.remove (alias of destroy)
DataAccessObject.prototype.delete (alias of destroy)
DataAccessObject.prototype.destroy
DataAccessObject.prototype.updateAttribute
DataAccessObject.prototype.updateAttributes
DataAccessObject.prototype.reload ?

datasource.js
All of them are instance methods DataSource.prototype.
automigrate
autoupdate
discoverModelDefinitions
discoverModelProperties
discoverPrimaryKeys
discoverForeignKeys
discoverExportedForeignKeys
discoverSchema
discoverSchemas

relation-definition.js
HasMany.prototype.findById
HasMany.prototype.exists
HasMany.prototype.updateById
HasMany.prototype.destroyById
HasManyThrough.prototype.findById
HasManyThrough.prototype.destroyById
HasManyThrough.prototype.create
HasManyThrough.prototype.add
HasManyThrough.prototype.exists
HasManyThrough.prototype.remove
BelongsTo.prototype.create
BelongsTo.prototype.update
BelongsTo.prototype.destroy
BelongsTo.prototype.getAsync
HasOne.prototype.create
HasOne.prototype.update
HasOne.prototype.destroy
HasMany.prototype.create
HasOne.prototype.getAsync
EmbedsOne.prototype.embeddedValue
EmbedsOne.prototype.create
EmbedsOne.prototype.update
EmbedsOne.prototype.destroy
EmbedsMany.prototype.create
EmbedsMany.prototype.add
EmbedsMany.prototype.remove
ReferencesMany.prototype.findById
ReferencesMany.prototype.exists
ReferencesMany.prototype.updateById
ReferencesMany.prototype.destroyById
ReferencesMany.prototype.at
ReferencesMany.prototype.create
ReferencesMany.prototype.add
ReferencesMany.prototype.remove

observer.js
ObserverMixin.notifyObserversOf

transaction.js
TransactionMixin.beginTransaction
Transaction.prototype.commit
Transaction.prototype.rollback

@kjdelisle
Copy link
Contributor

@davidcheung What exactly needs updating here? Are we updating the doc descriptions, or just the method signatures to ensure that they say @returns Promise?

@davidcheung
Copy link
Contributor Author

@kjdelisle hmm i actually dont remember, i dont think i started it tho, perhaps @jannyHou might remember. I would assume it is to add jsdoc to the methods similar to strongloop/loopback#2040

@jannyHou
Copy link
Contributor

Follow the discussion in issue strongloop/strong-docs#63 I believe we already support promise in jsdoc, but not sure why it doesn't show up in website.

I remember I tested the implementation before and it works. I need to investigate how to display promise annotation properly.

@stale
Copy link

stale bot commented Sep 3, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@kjdelisle
Copy link
Contributor

Doc issue; shouldn't be stale.

@stale stale bot removed the stale label Sep 8, 2017
@kjdelisle kjdelisle self-assigned this Sep 8, 2017
@kjdelisle kjdelisle removed this from the #Epic: Promise-fy milestone Sep 8, 2017
@kjdelisle
Copy link
Contributor

@crandmck This looks like it's still an issue, but in the JSDoc itself.
As an example:
The automigrate function is making use of our promise-or-callback strategy, but the JSDoc is missing the @returns Promise<{type}> symbol.
https://github.com/strongloop/loopback-datasource-juggler/blob/master/lib/datasource.js#L919

@crandmck
Copy link
Contributor

OK, thanks for staying on top of it @kjdelisle. Do you want to open a PR for this? I can probably address it at some point, but if you want to get it fixed sooner rather than later.... :-)

@crandmck crandmck removed their assignment Nov 7, 2017
@stale
Copy link

stale bot commented Jan 6, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 6, 2018
@stale
Copy link

stale bot commented Jan 20, 2018

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale stale bot closed this as completed Jan 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants